terp - the ANT Tasks
v1.3.337

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

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.codemesh.terp.ant.devpartner.DevPartnerTool
              extended by com.codemesh.terp.ant.devpartner.boundschecker.BoundsChecker
All Implemented Interfaces:
Tool<DevPartnerTool>, TerpAware, TerpContextHolder, java.lang.Cloneable

public class BoundsChecker
extends DevPartnerTool

The taskwrapper for the DevPartner Boundschecker tool. This task relies on the ^bc() executor to locate the BoundsChecker executable. Currently, we only support BoundsChecker on Windows with the Microsoft Visual C++ compiler. BoundsChecker itself might further restrict this to a range of MSVC++ versions.

The BoundsChecker task is a lightweight wrapper around the BoundsChecker executable. Use this task to execute an instrumented executable or a normal executable invoking instrumented code.

In addition to generating a log file and optionally an XML file, this task can analyze the generated XML result file and fail the build if it contains any errors. Please see the documentation for the failOnError and parseXml attributes for a more detailed description of this process.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.codemesh.terp.ant.TerpAware
TerpAware.Delegate
 
Field Summary
 
Fields inherited from class com.codemesh.terp.ant.devpartner.DevPartnerTool
aware, ctx, EVAL, failOnError, options, TO_FILE, TO_INT, tool, toolSpec
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
BoundsChecker()
           
 
Method Summary
 BatchFileOption createBatch()
          The option resulting in a /B switch.
 ConfigFileOption createConfig()
          The option resulting in a /C switch.
 ExecutableOption createExecutable()
          The option specifying the executable to analyze and, optionally, its arguments.
 BooleanToolOption createMinimize()
          The option resulting in a /M switch.
 BooleanToolOption createNologo()
          The option resulting in a /NOLOGO switch.
 OutOption createOut()
          The option resulting in a /OUT switch.
 BooleanToolOption createSilent()
          The option resulting in a /S switch.
 WorkingDirOption createWorkingDir()
          The option resulting in a /W switch.
 XmlFileOption createXml()
          The option resulting in a /X, /XS, or /XD switch.
 void execute()
           
 java.lang.String getCode()
          Returns the tool code.
 boolean getParseXml()
           
 Version getVersion()
          Returns the tool version.
 void setParseXml(java.lang.String parsexml)
          Set to a value that can be evaluated to a boolean expression.
 
Methods inherited from class com.codemesh.terp.ant.devpartner.DevPartnerTool
addOption, getContext, getIf, getOptions, getTool, getUnless, isFailOnError, satisfiesConditions, setContext, setFailOnError, setIf, setProject, setTool, setUnless
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundsChecker

public BoundsChecker()
Method Detail

setParseXml

public void setParseXml(java.lang.String parsexml)
Set to a value that can be evaluated to a boolean expression. If true, have the task parse the XML file that might be generated. If the XML file contains any errors (leaks, etc.) the build will be failed based on the value of the failOnError attribute. The default value of the parseXml atttribute is "true". Turn the attribute to "false" if you want the build to succeed even if BoundsChecker discovers problems. Please note that the proper way to handle this condition would be to disable the errors using a configuration file.

Parameters:
parsexml - a boolean expression.

getParseXml

public boolean getParseXml()

createBatch

public BatchFileOption createBatch()
The option resulting in a /B switch.

Returns:
a BoundsChecker configuration option.

createConfig

public ConfigFileOption createConfig()
The option resulting in a /C switch.

Returns:
a BoundsChecker configuration option.

createExecutable

public ExecutableOption createExecutable()
The option specifying the executable to analyze and, optionally, its arguments.

Returns:
a BoundsChecker argument.

createMinimize

public BooleanToolOption createMinimize()
The option resulting in a /M switch.

Returns:
a BoundsChecker configuration option.

createNologo

public BooleanToolOption createNologo()
The option resulting in a /NOLOGO switch.

Returns:
a BoundsChecker configuration option.

createOut

public OutOption createOut()
The option resulting in a /OUT switch.

Returns:
a BoundsChecker configuration option.

createSilent

public BooleanToolOption createSilent()
The option resulting in a /S switch.

Returns:
a BoundsChecker configuration option.

createWorkingDir

public WorkingDirOption createWorkingDir()
The option resulting in a /W switch.

Returns:
a BoundsChecker configuration option.

createXml

public XmlFileOption createXml()
The option resulting in a /X, /XS, or /XD switch.

Returns:
a BoundsChecker configuration option.

getCode

public java.lang.String getCode()
Description copied from interface: Tool
Returns the tool code.

Returns:
the tool code.

getVersion

public Version getVersion()
Description copied from interface: Tool
Returns the tool version.

Returns:
the tool version.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

terp - the ANT Tasks
v1.3.337

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