terp - the ANT Tasks
v1.3.304

com.codemesh.terp.ant.devpartner
Class BooleanToolOption<T extends Tool>

java.lang.Object
  extended by com.codemesh.terp.ant.devpartner.AbstractToolOption<T>
      extended by com.codemesh.terp.ant.devpartner.BooleanToolOption<T>
All Implemented Interfaces:
ToolOption<T>
Direct Known Subclasses:
SimpleToolOption

public abstract class BooleanToolOption<T extends Tool>
extends AbstractToolOption<T>

A tool option that has a boolean value. The boolean value is set as a string to support terp template expressions as values.


Constructor Summary
BooleanToolOption()
           
 
Method Summary
 java.lang.String getValue()
          Returns the option's string value.
 boolean isEnabled(TerpContext ctx)
          A convenience method that returns true if the string value expands to a string that can be converted to teh boolean value true.
 void setValue(java.lang.String value)
          Sets the option's value.
 
Methods inherited from class com.codemesh.terp.ant.devpartner.AbstractToolOption
expand, expand, getIf, getProject, getUnless, quoteIfNecessary, satisfies, setIf, setProject, setUnless
 
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

BooleanToolOption

public BooleanToolOption()
Method Detail

getValue

public java.lang.String getValue()
Returns the option's string value.

Returns:
the string representation of the value.

setValue

public void setValue(java.lang.String value)
Sets the option's value.

Parameters:
value - the string value.

isEnabled

public boolean isEnabled(TerpContext ctx)
A convenience method that returns true if the string value expands to a string that can be converted to teh boolean value true.

Parameters:
ctx - the context in which we evaluate the option value.
Returns:
true or false.

terp - the ANT Tasks
v1.3.304

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