|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sf.codejen.TemplateAdapter
public class TemplateAdapter
Null implementation of Template
. All implementation of methods are empty or return null.
Constructor Summary | |
---|---|
TemplateAdapter()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateAdapter()
Method Detail |
---|
public boolean apply(Object model) throws TemplateException
Template
apply
in interface Template
TemplateException
- if any error is encoutered during the code
generation. Code Generator should use
Throwable.getCause()
to access the wrapped exception.public String getName()
Template
getName
in interface Template
public void addPostProcessor(TemplateProcessor processor)
Template
addPostProcessor
in interface Template
processor
- processing the output.public void undo()
Template
undo
in interface Template
public boolean isUndoable()
Template
isUndoable
in interface Template
public List<File> getGeneratedFileList()
Template
getGeneratedFileList
in interface Template
public void setModelExtractor(ModelExtractor extractor)
Template
ModelExtractor
for one-to-many code generation.
setModelExtractor
in interface Template
extractor
- extractor to extract the model.public void setFileNameGenerator(FileNameGenerator generator)
Template
FileNameGenerator
for generating file names for
one-to-many code generation.
setFileNameGenerator
in interface Template
generator
- the file name generator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |