|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.armax.ax.devtools.generator.AXgenerateConfig
Capsulates configuration for AXgenGenerate subtasks.
Constructor Summary | |
AXgenerateConfig()
|
|
AXgenerateConfig(AXgen axgen)
|
Method Summary | |
java.lang.Object |
clone()
|
AXelementSelector |
createElements()
|
int |
getAbstract()
Get the abstract property of this matcher. |
AXgen |
getAxgenTask()
|
java.lang.String |
getDestinationFile()
Getter for attribute destinationFile. |
java.lang.String |
getDestinationPath()
Getter for attribute destinationPath. |
AXelementSelector |
getElementSelector()
|
java.lang.String[] |
getElementTypes()
Get the matching element types as an array of Strings. |
java.lang.String |
getEndTemplateFile()
Getter for attribute endTemplateFile |
java.lang.Class |
getHelperClass()
Getter for attribute helperClass |
int |
getInstantiable()
Get the instantiable property of this matcher. |
java.lang.String |
getRootPackageName()
|
java.lang.String |
getStartTemplateFile()
Getter for attribute startTemplateFile |
java.lang.String |
getTemplateFile()
Getter for attribute templateFile |
boolean |
match(AXmodelElement element)
Check whether a model element is matched by this matcher. |
void |
setAbstract(java.lang.String abstractString)
Configure this element matcher to match only elements that are abstract/not abstract. |
void |
setAxgenTask(AXgen axgen)
|
void |
setDestinationFile(java.lang.String destinationFile)
Setter for attribute destinationFile This is used to determine the destination files the output will be written to. |
void |
setDestinationPath(java.lang.String destinationPath)
Setter for attribute destinationPath. |
void |
setElementTypes(java.lang.String elementTypes)
Set the element types that are used for generation. |
void |
setEndTemplateFile(java.lang.String endTemplateFile)
Setter for attribute endTemplateFile. |
void |
setHelperClass(java.lang.String helperClass)
Set the attribute helperClass A helper class may be used in templates (accessible through the Velocity variable $helper) to perform any operations with the model elements A helper class must have a no argument method getInstance returning an instance of the helper class (or an instance of any other class that will be used as helper class) or a no argument constructor to be instantiated |
void |
setInstantiable(java.lang.String instantiableString)
Configure this element matcher to match only elements that are instantiable/not instantiable. |
void |
setRootPackageName(java.lang.String rootPackageName)
|
void |
setStartTemplateFile(java.lang.String startTemplateFile)
Setter for attribute startTemplateFile. |
void |
setTemplateFile(java.lang.String templateFile)
Setter for attrbute templateFile. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AXgenerateConfig()
public AXgenerateConfig(AXgen axgen)
Method Detail |
public void setElementTypes(java.lang.String elementTypes)
Set the element types that are used for generation.
elementTypes
- a comma separated list of element type names (class, interface and package)
org.apache.tools.ant.BuildException
- if the argument contains illegal datapublic java.lang.String[] getElementTypes()
Get the matching element types as an array of Strings.
If the elementTypes property was not yet set, returns the element type of the parent element matcher, which could thus be used as a default element matcher.
public void setInstantiable(java.lang.String instantiableString)
Configure this element matcher to match only elements that are instantiable/not instantiable.
Accepted values are true
or yes
if only instantiable classes are to be matched,
any
or null if instantiable and non instantiable classes are to be matched, any other value
if only non instantiable classes are to be matched.
instantiableString
- public int getInstantiable()
Get the instantiable property of this matcher. This property is ignored when the model element to match
is not an AXclass
.
If the instantiable property was not yet set, returns the instantiable property of the parent element matcher.
public void setAbstract(java.lang.String abstractString)
Configure this element matcher to match only elements that are abstract/not abstract.
Accepted values are true
or yes
if only abstract classes are to be matched,
any
or null if abstract and non abstract classes are to be matched, any other value
if only non abstract classes are to be matched.
abstractString
- public int getAbstract()
Get the abstract property of this matcher. This property is ignored when the model element to match
is not an AXclass
.
If the abstract property was not yet set, returns the instantiable property of the parent element matcher.
public boolean match(AXmodelElement element)
Check whether a model element is matched by this matcher.
element
- the element to check
public void setDestinationPath(java.lang.String destinationPath)
Setter for attribute destinationPath.
This overrides the destinationPath attribute in the parent AXgen task.
AXgen.setDestinationPath(String)
public java.lang.String getDestinationPath()
Getter for attribute destinationPath.
public void setDestinationFile(java.lang.String destinationFile)
Setter for attribute destinationFile
This is used to determine the destination files the output will be written to.
Destination files may depend on the current element, code is generated for and on the package this element is located in. Any occurences of $element.[navigationString]() will be replaced by calling the methods represented by [navigationString] (separated by dots, no brackets) on the current element. Any occurences of $package.[navigationString]() will be replaced by doing the same thing on the current package
If destinationFile does not depend neither on packages nor on elements, one single file is generated If destinationFile does not depend on elements, one file per package is generated
public java.lang.String getDestinationFile()
Getter for attribute destinationFile.
public void setTemplateFile(java.lang.String templateFile)
Setter for attrbute templateFile.
This sets the templateFile to be used for code generation. If a templatePath attribute was specified in the parent AXgen task, this path is used to locate the templates. If no templates are found on the templatePath or no templatePath was specified, templates are supposed to be on the classpath.
AXgen.setTemplatePath(String)
public java.lang.String getTemplateFile()
Getter for attribute templateFile
public void setStartTemplateFile(java.lang.String startTemplateFile)
Setter for attribute startTemplateFile.
public java.lang.String getStartTemplateFile()
Getter for attribute startTemplateFile
public void setEndTemplateFile(java.lang.String endTemplateFile)
Setter for attribute endTemplateFile.
public java.lang.String getEndTemplateFile()
Getter for attribute endTemplateFile
public AXelementSelector createElements()
public AXelementSelector getElementSelector()
public void setHelperClass(java.lang.String helperClass) throws org.apache.tools.ant.BuildException
Set the attribute helperClass
A helper class may be used in templates (accessible through the Velocity variable $helper) to perform any operations with the model elements
A helper class must have a no argument method getInstance returning an instance of the helper class (or an instance of any other class that will be used as helper class) or a no argument constructor to be instantiated
org.apache.tools.ant.BuildException
public java.lang.Class getHelperClass()
Getter for attribute helperClass
AXojbHelper
.class if the property was
not set.public void setRootPackageName(java.lang.String rootPackageName)
public java.lang.String getRootPackageName()
public java.lang.Object clone()
public void setAxgenTask(AXgen axgen)
public AXgen getAxgenTask()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |