Class InstrumentTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.offbynull.coroutines.antplugin.InstrumentTask
- All Implemented Interfaces:
Cloneable
public final class InstrumentTask
extends org.apache.tools.ant.Task
ANT task to run coroutine instrumentation.
Sample usage in build script:
<taskdef name="InstrumentTask" classname="com.offbynull.coroutines.antplugin.InstrumentTask">
<classpath>
<pathelement location="ant-plugin-{version}-shaded.jar"/>
</classpath>
</taskdef>
<target name="-post-compile">
<InstrumentTask classpath="somelib.jar;somefolder;someotherlib.jar" sourceDirectory="build" targetDirectory="build"/>
</target>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Stringprivate booleanprivate Stringprivate Fileprivate FileFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()voidsetAutoSerializable(boolean autoSerializable) Sets the auto-serializable flag.voidsetClasspath(String classpath) Sets the classpath -- required by instrumenter when instrumenting class files.voidsetDebugMode(boolean debugMode) Sets the debug mode.voidsetMarkerType(String markerType) Sets the marker type.voidsetSourceDirectory(File sourceDirectory) Sets the directory to read class files from.voidsetTargetDirectory(File targetDirectory) Sets the directory to write instrumented class files to.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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
markerType
-
debugMode
private boolean debugMode -
autoSerializable
private boolean autoSerializable -
classpath
-
sourceDirectory
-
targetDirectory
-
-
Constructor Details
-
InstrumentTask
public InstrumentTask()Constructs aInstrumentTaskobject.
-
-
Method Details
-
setMarkerType
Sets the marker type. Defaults to NONE.- Parameters:
markerType- debug marker type (must be a value fromDebugGenerators.MarkerType)
-
setDebugMode
public void setDebugMode(boolean debugMode) Sets the debug mode. Defaults tofalse.- Parameters:
debugMode- debug mode
-
setAutoSerializable
public void setAutoSerializable(boolean autoSerializable) Sets the auto-serializable flag. Defaults totrue.- Parameters:
autoSerializable- auto-serializable
-
setClasspath
Sets the classpath -- required by instrumenter when instrumenting class files.- Parameters:
classpath- semicolon delimited classpath
-
setSourceDirectory
Sets the directory to read class files from.- Parameters:
sourceDirectory- source directory
-
setTargetDirectory
Sets the directory to write instrumented class files to.- Parameters:
targetDirectory- target directory
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-