Class AbstractInstrumentMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.offbynull.coroutines.mavenplugin.AbstractInstrumentMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
MainInstrumentMojo,TestInstrumentMojo
public abstract class AbstractInstrumentMojo
extends org.apache.maven.plugin.AbstractMojo
Abstract instrumentation mojo. Provides base functionality for instrumentation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate DebugGenerators.MarkerTypeprivate org.apache.maven.project.MavenProjectFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate InstrumentergetInstrumenter(org.apache.maven.plugin.logging.Log log, List<String> classpath) Creates anInstrumenterinstance.protected final org.apache.maven.project.MavenProjectGets the maven project details.protected final voidinstrumentPath(org.apache.maven.plugin.logging.Log log, List<String> classpath, File path) Instruments all classes in a path recursively.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project -
markerType
@Parameter(property="coroutines.markerType", defaultValue="NONE") private DebugGenerators.MarkerType markerType -
debugMode
@Parameter(property="coroutines.debugMode", defaultValue="false") private boolean debugMode -
autoSerializable
@Parameter(property="coroutines.autoSerializable", defaultValue="true") private boolean autoSerializable
-
-
Constructor Details
-
AbstractInstrumentMojo
public AbstractInstrumentMojo()
-
-
Method Details
-
instrumentPath
protected final void instrumentPath(org.apache.maven.plugin.logging.Log log, List<String> classpath, File path) throws org.apache.maven.plugin.MojoExecutionException Instruments all classes in a path recursively.- Parameters:
log- maven loggerclasspath- classpath for classes being instrumentedpath- directory containing files to instrument- Throws:
org.apache.maven.plugin.MojoExecutionException- if any exception occurs
-
getInstrumenter
private Instrumenter getInstrumenter(org.apache.maven.plugin.logging.Log log, List<String> classpath) throws org.apache.maven.plugin.MojoExecutionException Creates anInstrumenterinstance.- Parameters:
log- maven loggerclasspath- classpath for classes being instrumented- Returns:
- a new
Instrumenter - Throws:
org.apache.maven.plugin.MojoExecutionException- if any exception occurs
-
getProject
protected final org.apache.maven.project.MavenProject getProject()Gets the maven project details.- Returns:
- maven project
-