com.codemesh.terp.ant.codegen
Class ModelProperty
java.lang.Object
com.codemesh.terp.ant.codegen.AbstractCodeGeneratorOption
com.codemesh.terp.ant.codegen.ModelProperty
- All Implemented Interfaces:
- CodeGeneratorOption, TerpAware, TerpContextHolder
public class ModelProperty
- extends AbstractCodeGeneratorOption
An option representing a model property default value override.
The code generator will populate the model with default values for
many properties. It will only use its hard-coded default values if the
model property has not been set yet, i.e. if it has a null value. By providing a
ModelProperty you specify a non-null default value that prevents the
code generator from using its hard-coded default value.
The specified model property value can still be overridden by commands
in a modelfile.
|
Method Summary |
void |
addToArguments(java.util.List<java.lang.String> args,
boolean bSpawn)
|
void |
setName(java.lang.String name)
Sets the option's name. |
void |
setValue(java.lang.String value)
Sets the option's value. |
| Methods inherited from class com.codemesh.terp.ant.codegen.AbstractCodeGeneratorOption |
expand, expand, getContext, getIf, getProject, getUnless, quoteIfNecessary, satisfiesConditions, setContext, setIf, setProject, setUnless |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelProperty
public ModelProperty()
ModelProperty
public ModelProperty(org.apache.tools.ant.Project p)
setName
public void setName(java.lang.String name)
- Sets the option's name.
- Parameters:
name - the option name.
setValue
public void setValue(java.lang.String value)
- Sets the option's value.
The code generator usually interprets this value as a terp expression.
- Parameters:
value - the option value.
addToArguments
public void addToArguments(java.util.List<java.lang.String> args,
boolean bSpawn)
Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.