|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.cartridge.Resource
org.andromda.core.cartridge.template.Template
public class Template
This class implements the <template> tag in a cartridge
descriptor file.
| Constructor Summary | |
|---|---|
Template()
The default constructor used by the XmlObjectFactory to instantiate the template configuration. |
|
| Method Summary | |
|---|---|
File |
getOutputLocation(String metafacadeName,
String packageName,
File directory,
String outputPattern)
Returns the fully qualified output file, this means: the output pattern has been translated the output dir name has been prepended |
ModelElements |
getSupportedModeElements()
Tells us the model elements that are supported by this template (i.e. |
boolean |
isGenerateEmptyFiles()
Tells us whether output files are generated by this template if the template produces empty output. |
boolean |
isOutputOnEmptyElements()
Indicates that when there are no elements in the collection of elements (when isOutputToSingleFile() is
true, whether or not the file should be output. |
boolean |
isOutputToSingleFile()
If output to single file is true then all model elements found by the processor (i.e. |
void |
setGenerateEmptyFiles(boolean generateEmptyFiles)
Tells us whether output files should be generated if this template does not produce any output. |
void |
setOutputOnEmptyElements(boolean outputOnEmptyElements)
Sets whether or not we should output a file when no elements exist in the collection of elements when isOutputToSingleFile() returns true. |
void |
setOutputToSingleFile(boolean outputToSingleFile)
Sets whether or not we should aggregate elements and output to a single file. |
void |
setSupportedModelElements(ModelElements supportedModelElements)
Sets the model elements that are supported by this template. |
String |
toString()
|
| Methods inherited from class org.andromda.core.cartridge.Resource |
|---|
getCartridge, getOutlet, getOutputCondition, getOutputLocation, getOutputPattern, getPath, isLastModifiedCheck, isOverwrite, setCartridge, setLastModifiedCheck, setOutlet, setOutputCondition, setOutputPattern, setOverwrite, setPath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Template()
XmlObjectFactory to instantiate the template configuration.
| Method Detail |
|---|
public void setGenerateEmptyFiles(boolean generateEmptyFiles)
generateEmptyFiles - generate files for empty output yes/nopublic boolean isGenerateEmptyFiles()
public File getOutputLocation(String metafacadeName,
String packageName,
File directory,
String outputPattern)
metafacadeName - name of the metafacade.packageName - name of the package from the model in which the class
is containeddirectory - the directory as a File.outputPattern - if defined, this overrides the value of Resource.getOutputPattern().
public ModelElements getSupportedModeElements()
ModelElementspublic void setSupportedModelElements(ModelElements supportedModelElements)
supportedModelElements - the ModelElements instance.ModelElementspublic boolean isOutputToSingleFile()
true then all model elements found by the processor (i.e. all those
having matching modelElements) will aggregated and output to one single file.
public void setOutputToSingleFile(boolean outputToSingleFile)
outputToSingleFile - The outputToSingleFile to set.public boolean isOutputOnEmptyElements()
isOutputToSingleFile() is
true, whether or not the file should be output. Default is true
isOutputToSingleFile()public void setOutputOnEmptyElements(boolean outputOnEmptyElements)
isOutputToSingleFile() returns true.
outputOnEmptyElements - the boolean flag.isOutputOnEmptyElements(),
isOutputToSingleFile()public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||