terp - the ANT Tasks
v1.3.337

com.codemesh.terp.ant.devpartner.boundschecker
Class XmlFileOption

java.lang.Object
  extended by com.codemesh.terp.ant.devpartner.AbstractToolOption<DevPartnerTool>
      extended by com.codemesh.terp.ant.devpartner.boundschecker.XmlFileOption
All Implemented Interfaces:
FileCreating<DevPartnerTool>, ToolOption<DevPartnerTool>

public class XmlFileOption
extends AbstractToolOption<DevPartnerTool>
implements FileCreating<DevPartnerTool>

An option specifying the XML file that is created by BoundsChecker.


Field Summary
static java.lang.String INCLUDE_ALL
           
static java.lang.String INCLUDE_DETAILS
           
static java.lang.String INCLUDE_SUMMARY
           
 
Constructor Summary
XmlFileOption()
           
 
Method Summary
 void addCommands(java.util.List<java.lang.String> commandList, DevPartnerTool tool, ToolPhase phase)
          Adds the tool switches repreesnted by this option to the list of switches.
 boolean appliesTo(DevPartnerTool tool, ToolPhase phase)
          Returns true if this tool option applies to the given tool and tool phase.
 java.io.File calculateXmlFile(DevPartnerTool tool)
           
 java.util.List<java.lang.String> creates(DevPartnerTool tool, ToolPhase phase)
          Returns a list of filenames representing the files that are created due to the presence of this tool option.
 void setFile(java.lang.String file)
          Set the XML result file name.
 void setInclude(java.lang.String include)
          Set the information to be included in the XML file.
 
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
getIf, getUnless, satisfies, setIf, setUnless
 

Field Detail

INCLUDE_ALL

public static final java.lang.String INCLUDE_ALL
See Also:
Constant Field Values

INCLUDE_SUMMARY

public static final java.lang.String INCLUDE_SUMMARY
See Also:
Constant Field Values

INCLUDE_DETAILS

public static final java.lang.String INCLUDE_DETAILS
See Also:
Constant Field Values
Constructor Detail

XmlFileOption

public XmlFileOption()
Method Detail

setFile

public void setFile(java.lang.String file)
Set the XML result file name.

Parameters:
file - the result file.

setInclude

public void setInclude(java.lang.String include)
Set the information to be included in the XML file. This should be one of "all", "details", or "summary". The default value is "all".

Parameters:
include - the information to include.

addCommands

public void addCommands(java.util.List<java.lang.String> commandList,
                        DevPartnerTool 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.

Specified by:
addCommands in interface ToolOption<DevPartnerTool>
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(DevPartnerTool 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.

Specified by:
appliesTo in interface ToolOption<DevPartnerTool>
Parameters:
tool - the tool for which we're asking.
phase - the tool phase we're executing.
Returns:

calculateXmlFile

public java.io.File calculateXmlFile(DevPartnerTool tool)

creates

public java.util.List<java.lang.String> creates(DevPartnerTool tool,
                                                ToolPhase phase)
Description copied from interface: FileCreating
Returns a list of filenames representing the files that are created due to the presence of this tool option.

Specified by:
creates in interface FileCreating<DevPartnerTool>
Parameters:
tool - the tool.
phase - the tool phase.
Returns:
a list of files, possibly empty.

terp - the ANT Tasks
v1.3.337

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