You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
834 B

package lorem.ipsum.javatester
import java.util.UUID;
import lorem.ipsum.javatester.domain.CodeModel;
import lorem.ipsum.javatester.file.*;
//By convention. ...
//and the second line has to have a model creation command
<<:begin>>
<<:method generate CodeModel model, String inputPath>>
<<:file x {UUID.randomUUID().toString()}.txt>>
<<:model CodeModel model>>
if (model.getName().equals("Lorem Ipsum")) {
<<:out x Hello, Lorem!\r\n>>
} else if (model.getName() == null) {
<<:out x Null???\r\n>>
} else {
<<:file y hello-{UUID.randomUUID().toString()}\r\n>>
<<:out y Hello, {model.getName().toUpperCase()} !\r\n>>
}
for (Attribute attr : model.getAttributes()) {
<<:file z hello-z-{UUID.randomUUID().toString()}\r\n>>
<<:out z Hello, {attr.getId().toUpperCase()} !\r\n>>
}
<<:end>>
<<:end>>