|
terp - the ANT Tasks v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemesh.terp.ant.codegen.AbstractCodeGeneratorOption
public abstract class AbstractCodeGeneratorOption
The base class for code generator options.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.codemesh.terp.ant.TerpAware |
|---|
TerpAware.Delegate |
| Constructor Summary | |
|---|---|
protected |
AbstractCodeGeneratorOption()
|
protected |
AbstractCodeGeneratorOption(org.apache.tools.ant.Project p)
|
| Method Summary | |
|---|---|
protected java.lang.String |
expand(java.lang.String str,
java.lang.String propName,
TerpContext ctx)
A utility method that expands the given string in the given context. |
protected java.lang.String |
expand(java.lang.String str,
TerpContext ctx)
A utility method that expands teh given string in the given context. |
TerpContext |
getContext()
Returns the context maintained by this instance. |
java.lang.String |
getIf()
Returns the condition that must be satidifed to execute the implementing task. |
org.apache.tools.ant.Project |
getProject()
Returns the ANT project this option belongs to. |
java.lang.String |
getUnless()
Returns the condition that must not be satidifed to execute the implementing task. |
protected java.lang.String |
quoteIfNecessary(java.lang.String str)
Quotes strings containing spaces, leaves other strings alone. |
boolean |
satisfiesConditions()
Returns true if both conditions are met. |
void |
setContext(TerpContext ctx)
Sets the context maintained by this instance. |
void |
setIf(java.lang.String condition)
Sets a condition that must be satisfied to execute the implementing task. |
void |
setProject(org.apache.tools.ant.Project p)
Maintains the project with the option. |
void |
setUnless(java.lang.String condition)
Sets a condition that must not be satisfied to execute the implementing task. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.codemesh.terp.ant.codegen.CodeGeneratorOption |
|---|
addToArguments |
| Constructor Detail |
|---|
protected AbstractCodeGeneratorOption()
protected AbstractCodeGeneratorOption(org.apache.tools.ant.Project p)
| Method Detail |
|---|
public void setProject(org.apache.tools.ant.Project p)
p - the ANT project.public org.apache.tools.ant.Project getProject()
public java.lang.String getIf()
getIf in interface TerpAwarepublic void setIf(java.lang.String condition)
setIf in interface TerpAwarecondition - a terp expression that must evaluate to a boolean value.public java.lang.String getUnless()
getUnless in interface TerpAwarepublic void setUnless(java.lang.String condition)
setUnless in interface TerpAwarecondition - a terp expression that must evaluate to a boolean value.public boolean satisfiesConditions()
satisfiesConditions in interface TerpAwarepublic void setContext(TerpContext ctx)
setContext in interface TerpContextHolderctx - the execution context.public TerpContext getContext()
getContext in interface TerpContextHolder
protected java.lang.String expand(java.lang.String str,
TerpContext ctx)
str - the given string, interpreted as an embedded terp template string.ctx - the context in which to evaluate the template string.
protected java.lang.String expand(java.lang.String str,
java.lang.String propName,
TerpContext ctx)
str - the given string, interpreted as an embedded terp template string.propName - the property name for which we're performing this operation.
The name is used to provide additional context if an error occurs during
template expansion.ctx - the context in which to evaluate the template string.
protected java.lang.String quoteIfNecessary(java.lang.String str)
str - the input string.
|
terp - the ANT Tasks v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||