|
||||||||||
| 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 TemplateTemplateException - 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 Templatepublic void addPostProcessor(TemplateProcessor processor)
Template
addPostProcessor in interface Templateprocessor - processing the output.public void undo()
Template
undo in interface Templatepublic boolean isUndoable()
Template
isUndoable in interface Templatepublic List<File> getGeneratedFileList()
Template
getGeneratedFileList in interface Templatepublic void setModelExtractor(ModelExtractor extractor)
TemplateModelExtractor for one-to-many code generation.
setModelExtractor in interface Templateextractor - extractor to extract the model.public void setFileNameGenerator(FileNameGenerator generator)
TemplateFileNameGenerator for generating file names for
one-to-many code generation.
setFileNameGenerator in interface Templategenerator - the file name generator.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||