Update 'Home'

master
code-dev 3 years ago
parent
commit
4c977e5523
  1. 16
      Home.md

16
Home.md

@ -185,7 +185,7 @@ Hello, NOT LOREM IPSUM!
Each line of a template file can only be either Java code or generative function.
```
```java
Template Line := Java Code | Generative-Function
```
@ -214,7 +214,7 @@ The initial design was limited so that a single generative function could not ta
out - The workhorse function has been modified so that it can spread over multiple lines as shown below:
```
```java
<<:out x
Line 1 \n
Line 2 \n
@ -226,7 +226,7 @@ out - The workhorse function has been modified so that it can spread over multip
Not
```
```java
<<:out x Line 1 \n>>
<<:out x Line 2 \n>>
<<:out x Line 3 \n>>
@ -263,7 +263,7 @@ TimeZoneID
[https://docs.oracle.com/middleware/12212/wcs/tag-ref/MISC/TimeZones.html](https://docs.oracle.com/middleware/12212/wcs/tag-ref/MISC/TimeZones.html)
```
```java
public class Person {
private final String name;
@ -292,7 +292,7 @@ Now that I have a domain class to feed to a template. Let’s sketch out a templ
Firstly, we need to create a list of "Person" objects. The list is fed to CodeGenerator, and the ZoneId of the Person object is used for each Person to find out what greeting to use.
```
```java
<<:begin>>
<<:method generate List<Person> model>>
for (Person person : model) {
@ -320,7 +320,7 @@ Firstly, we need to create a list of "Person" objects. The list is fed to CodeGe
Secondly, a new file with the text content is created for each Person.
```
```java
<<:begin>>
<<:method generate List<Person> model>>
for (Person person : model) {
@ -358,7 +358,7 @@ Lastly, we append the appropriate greeting for each Person to the Person's name.
After filling out import statements and few extra generative functions, We now have a complete template to achieve the goal.
```
```java
package lorem.ipsum.javatester.test;
import java.lang.reflect.InvocationTargetException;
@ -404,7 +404,7 @@ for (Person person : model) {
Let’s try out the template as shown below:
```
```java
Person mary = new Person("Mary", ZoneId.of("America/New_York"));
Person bob = new Person("Bob", ZoneId.of("Pacific/Auckland"));

Loading…
Cancel
Save