terp - the ANT Tasks
v1.3.304

com.codemesh.terp.ant.compiler
Class BooleanCompilerOption<C extends Compiler>

java.lang.Object
  extended by com.codemesh.terp.ant.compiler.AbstractCompilerOption<C>
      extended by com.codemesh.terp.ant.compiler.BooleanCompilerOption<C>
All Implemented Interfaces:
CompilerOption<C>
Direct Known Subclasses:
BoundsCheckOption, CompileOnlyOption, DebugOption, ExceptionsOption, ManifestOption, MultithreadedOption, ProfileOption, QuietOption, RelocatableOption, RttiOption, VsProjectOption

public abstract class BooleanCompilerOption<C extends Compiler>
extends AbstractCompilerOption<C>

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


Constructor Summary
BooleanCompilerOption()
           
 
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.compiler.AbstractCompilerOption
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.compiler.CompilerOption
addCommands, appliesTo
 

Constructor Detail

BooleanCompilerOption

public BooleanCompilerOption()
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.