|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Template
Interface for template definition.
Method Summary | |
---|---|
void |
addPostProcessor(TemplateProcessor processor)
Adds the post processor of the source code. |
boolean |
apply(Object model)
Applies the data model to the template. |
List<File> |
getGeneratedFileList()
Gets a list of generated files for post processor to process. |
String |
getName()
Gets the name of the template. |
boolean |
isUndoable()
Indicates if undo is implemented. |
void |
setFileNameGenerator(FileNameGenerator generator)
Sets the FileNameGenerator for generating file names for
one-to-many code generation. |
void |
setModelExtractor(ModelExtractor extractor)
Sets the ModelExtractor for one-to-many code generation. |
void |
undo()
Undos the code generation. i.e. |
Method Detail |
---|
String getName()
boolean apply(Object model) throws TemplateException
model
-
TemplateException
- if any error is encoutered during the code
generation. Code Generator should use
Throwable.getCause()
to access the wrapped exception.void addPostProcessor(TemplateProcessor processor)
processor
- processing the output.void setModelExtractor(ModelExtractor extractor)
ModelExtractor
for one-to-many code generation.
extractor
- extractor to extract the model.void setFileNameGenerator(FileNameGenerator generator)
FileNameGenerator
for generating file names for
one-to-many code generation.
generator
- the file name generator.void undo()
boolean isUndoable()
List<File> getGeneratedFileList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |