|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.tool.codegen.TemplateDrivenGenerator
A partial implementation of the Generator interface that works with template files. The predefined generators are based on this class.
Field Summary | |
static java.util.ResourceBundle |
res
|
Fields inherited from interface org.enhydra.tool.codegen.Constants |
CLIENT_SUFFIX, CONTENT_HTML, CONTENT_WML, DIR_AT_PACKAGE_DIR_AT, DIR_INPUT, DIR_LIB, DIR_MEDIA, DIR_OUTPUT, DIR_PRESENTATION, DIR_RESOURCES, DIR_SRC, DIR_TEMPLATE, DIR_TOOL, FILE_BUILD_XML, FILE_ENHYDRA_JAR, FILE_MAKEFILE, FILE_README_HTML, FILE_RUN_BAT_IN, FILE_RUN_IN, SYS_JAVA_VENDOR, SYS_JAVA_VERSION, SYS_USER_HOME, TAB4, TYPE_BAT, TYPE_CONF, TYPE_HTML, TYPE_IN, TYPE_JAVA, TYPE_MK, TYPE_TEMPLATE, TYPE_WML, TYPE_XML, XMLC_DEFAULT, XMLC_SUFFIX |
Constructor Summary | |
TemplateDrivenGenerator()
|
Method Summary | |
abstract TemplateFilter |
createCopyFilter(TemplateTool tool)
|
abstract Replacement[] |
createReplacementsForDirectory(PathHandle path)
|
abstract TemplateFilter |
createTemplateFilter(TemplateTool tool)
|
java.io.File[] |
generate()
Generate application files from a set of templates. |
abstract java.lang.String |
getDestination()
|
protected java.lang.String[] |
getInputIncludes()
|
OptionSet |
getOptionSet()
Get generator option set |
java.util.Properties |
getProperties()
Get properties used to customize CodeGen. |
ReplacementSet |
getReplacementSet()
Get the replacement operations to run against the templates. |
Template |
getTemplateRoot()
Get the location of the template files. |
abstract void |
initReplacementSet()
|
boolean |
isEcho()
|
boolean |
isOverwrite()
|
boolean |
isSwing()
|
void |
setEcho(boolean b)
|
void |
setOptionSet(OptionSet set)
|
void |
setOverwrite(boolean b)
|
void |
setProperties(java.util.Properties p)
Set CodeGen customization properties. |
void |
setReplacementSet(ReplacementSet replacementSet)
Set the replacement operations to run against the templates. |
void |
setSwing(boolean b)
|
void |
storeProperties()
Method declaration |
java.lang.String |
toString()
Use the display name for the string representation of this class so that a list model can map directly into generators. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.enhydra.tool.codegen.Generator |
getAddinSteps, getCommandName, getDescription, getDisplayName, getShellSteps, getWizardPanels, getWizardTitle, setAddinSteps, setShellSteps |
Methods inherited from interface org.enhydra.tool.common.event.TemplateListener |
onTemplate |
Field Detail |
public static java.util.ResourceBundle res
Constructor Detail |
public TemplateDrivenGenerator()
Method Detail |
public abstract TemplateFilter createTemplateFilter(TemplateTool tool) throws GeneratorException
GeneratorException
public abstract TemplateFilter createCopyFilter(TemplateTool tool) throws GeneratorException
GeneratorException
public abstract java.lang.String getDestination() throws GeneratorException
GeneratorException
public abstract void initReplacementSet() throws GeneratorException
GeneratorException
public abstract Replacement[] createReplacementsForDirectory(PathHandle path) throws GeneratorException
GeneratorException
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Properties getProperties()
getProperties
in interface Generator
public void setProperties(java.util.Properties p) throws GeneratorException
setProperties
in interface Generator
p
- Properties passed from the CodeGen class.
GeneratorException
public Template getTemplateRoot()
public boolean isOverwrite()
public void setOverwrite(boolean b)
public boolean isEcho()
isEcho
in interface Generator
public void setEcho(boolean b)
setEcho
in interface Generator
public boolean isSwing()
isSwing
in interface Generator
public void setSwing(boolean b)
setSwing
in interface Generator
public ReplacementSet getReplacementSet()
public void setReplacementSet(ReplacementSet replacementSet)
public OptionSet getOptionSet()
getOptionSet
in interface Generator
public void setOptionSet(OptionSet set)
public java.io.File[] generate() throws GeneratorException
generate
in interface Generator
GenerationException
- Thrown if unable to generate all the files. Note that generation will fail
if the template directory has not been set.
GeneratorException
- Thrown if all the files could not be generated without error.public void storeProperties()
protected java.lang.String[] getInputIncludes()
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |