terp - the ANT Tasks
v1.3.304

com.codemesh.terp.ant
Class TerpAware.Delegate

java.lang.Object
  extended by com.codemesh.terp.ant.TerpAware.Delegate
All Implemented Interfaces:
TerpAware, TerpContextHolder
Enclosing interface:
TerpAware

public static final class TerpAware.Delegate
extends java.lang.Object
implements TerpAware

A utility class that implements the TerpAware interface. Use this class in custom tasks by delegating to an instance of this type from the implementation of all methods.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.codemesh.terp.ant.TerpAware
TerpAware.Delegate
 
Constructor Summary
TerpAware.Delegate(TerpAware source, org.apache.tools.ant.Project p)
           
 
Method Summary
 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.
 TerpAware getSource()
           
 java.lang.String getUnless()
          Returns the condition that must not be satidifed to execute the implementing task.
 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 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
 

Constructor Detail

TerpAware.Delegate

public TerpAware.Delegate(TerpAware source,
                          org.apache.tools.ant.Project p)
Method Detail

getSource

public TerpAware getSource()

getContext

public TerpContext getContext()
Description copied from interface: TerpContextHolder
Returns the context maintained by this instance.

Specified by:
getContext in interface TerpContextHolder
Returns:
an execution context.

setContext

public void setContext(TerpContext ctx)
Description copied from interface: TerpContextHolder
Sets the context maintained by this instance.

Specified by:
setContext in interface TerpContextHolder
Parameters:
ctx - the execution context.

getIf

public java.lang.String getIf()
Description copied from interface: TerpAware
Returns the condition that must be satidifed to execute the implementing task.

Specified by:
getIf in interface TerpAware
Returns:
the boolean expression.

setIf

public void setIf(java.lang.String condition)
Description copied from interface: TerpAware
Sets a condition that must be satisfied to execute the implementing task.

Specified by:
setIf in interface TerpAware
Parameters:
condition - a terp expression that must evaluate to a boolean value.

getUnless

public java.lang.String getUnless()
Description copied from interface: TerpAware
Returns the condition that must not be satidifed to execute the implementing task.

Specified by:
getUnless in interface TerpAware
Returns:
the boolean expression.

setUnless

public void setUnless(java.lang.String condition)
Description copied from interface: TerpAware
Sets a condition that must not be satisfied to execute the implementing task.

Specified by:
setUnless in interface TerpAware
Parameters:
condition - a terp expression that must evaluate to a boolean value.

satisfiesConditions

public boolean satisfiesConditions()
Description copied from interface: TerpAware
Returns true if both conditions are met.

Specified by:
satisfiesConditions in interface TerpAware
Returns:
true or false.

terp - the ANT Tasks
v1.3.304

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.