|
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.devpartner.AbstractToolOption<T>
public abstract class AbstractToolOption<T extends Tool>
The base class for most concrete tool options.
| Constructor Summary | |
|---|---|
AbstractToolOption()
|
|
| 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. |
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 |
satisfies(TerpContext ctx)
Returns true if both conditions are met within the given terp context. |
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.devpartner.ToolOption |
|---|
addCommands, appliesTo |
| Constructor Detail |
|---|
public AbstractToolOption()
| 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 ToolOption<T extends Tool>public void setIf(java.lang.String condition)
setIf in interface ToolOption<T extends Tool>condition - a terp expression that must evaluate to a boolean value.public java.lang.String getUnless()
getUnless in interface ToolOption<T extends Tool>public void setUnless(java.lang.String condition)
setUnless in interface ToolOption<T extends Tool>condition - a terp expression that must evaluate to a boolean value.public boolean satisfies(TerpContext ctx)
satisfies in interface ToolOption<T extends Tool>ctx - the terp context in which the logical expressions are evaluated.
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 | |||||||||