terp - the ANT Tasks
v1.3.337

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

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

public class SimpleToolOption<T extends Tool>
extends BooleanToolOption<T>

A tool option that results in a simple switch.


Constructor Summary
SimpleToolOption(java.lang.String sw)
           
 
Method Summary
 void addCommands(java.util.List<java.lang.String> commandList, T tool, ToolPhase phase)
          Adds the tool switches repreesnted by this option to the list of switches.
 boolean appliesTo(T tool, ToolPhase phase)
          Returns true if this tool option applies to the given tool and tool phase.
 
Methods inherited from class com.codemesh.terp.ant.devpartner.BooleanToolOption
getValue, isEnabled, setValue
 
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
 

Constructor Detail

SimpleToolOption

public SimpleToolOption(java.lang.String sw)
Method Detail

addCommands

public void addCommands(java.util.List<java.lang.String> commandList,
                        T tool,
                        ToolPhase phase)
Description copied from interface: ToolOption
Adds the tool switches repreesnted by this option to the list of switches. Some tool options may result in more than one switch being added to a tool invocation. Other tool options may result in different options being added in different phases (compilation vs. linking) of the build.

This method is called by the tool repeatedly with different values for the tool phase to account for these possibilities.

Parameters:
commandList - the list to which the tool switches represented by this option (if any) are added.
tool - the tool for which we're doing this.
phase - the tool phase in wihch we're doing this.

appliesTo

public boolean appliesTo(T tool,
                         ToolPhase phase)
Description copied from interface: ToolOption
Returns true if this tool option applies to the given tool and tool phase. Not every option has switches to contribute for every tool and every compilation phase. This method allows a quick, inexpensive check to filter out potentially more expensive calls later on.

Parameters:
tool - the tool for which we're asking.
phase - the tool phase we're executing.
Returns:

terp - the ANT Tasks
v1.3.337

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