|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.aspectj.AbstractAjcMojo
org.codehaus.mojo.aspectj.AbstractAjcCompiler
public abstract class AbstractAjcCompiler
Base class for the two aspectJ compiletime weaving mojos.
For all available options see http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html
Field Summary | |
---|---|
protected List |
ajcOptions
Holder for ajc compiler options |
protected String |
ajdtBuildDefFile
Where to find the ajdt build definition file. |
protected String |
argumentFileName
The filename to store build configuration in. |
protected String |
aspectDirectory
The source directory for the aspects. |
protected String |
bootclasspath
Override location of VM's bootclasspath for purposes of evaluating types when compiling. |
protected String |
complianceLevel
Specify compiler compliance setting (1.3 to 1.6) default is 1.4 |
protected boolean |
deprecation
Toggle warningmessages on deprecations |
protected boolean |
emacssym
Generate .ajesym symbol files for emacs support. |
protected String |
encoding
Specify default source encoding format. |
protected String[] |
excludes
List of ant-style patterns used to specify the aspects that should be excluded when compiling. |
protected boolean |
forceAjcCompile
Forces re-compilation, regardless of whether the compiler arguments or the sources have changed. |
protected String[] |
includes
List of ant-style patterns used to specify the aspects that should be included when compiling. |
protected boolean |
noImportError
Emit no errors for unresolved imports; |
protected boolean |
outxml
Generate aop.xml file for load-time weaving with default name (/META-INF/aop.xml). |
protected String |
outxmlfile
Generate aop.xml file for load-time weaving with custom name. |
protected boolean |
preserveAllLocals
Preserve all local variables during code generation (to facilitate debugging). |
protected boolean |
proceedOnError
Keep compiling after error, dumping class files with problem methods |
protected boolean |
referenceInfo
Compute reference information. |
protected int |
repeat
Repeat compilation process N times (typically to do performance analysis). |
protected Set |
resolvedIncludes
Holds all files found using the includes, excludes parameters. |
protected boolean |
showWeaveInfo
Emit messages about weaving |
protected String |
source
Toggle assertions (1.3, 1.4, or 1.6 - default is 1.4). |
protected String |
target
Specify classfile target setting (1.1 to 1.6) default is 1.2 |
protected String |
testAspectDirectory
The source directory for the test aspects. |
protected boolean |
verbose
Emit messages about accessed/processed compilation units |
protected String |
warn
Emit warnings for any instances of the comma-delimited list of questionable code (e.g. |
protected boolean |
XaddSerialVersionUID
Causes the compiler to calculate and add the SerialVersionUID field to any type implementing Serializable that is
affected by an aspect. |
protected boolean |
XhasMember
Enables the compiler to support hasmethod(method_pattern) and hasfield(field_pattern) type patterns, but only within declare statements. |
protected String |
Xlint
Set default level for messages about potential programming mistakes in crosscutting code. |
protected boolean |
XnoInline
(Experimental) do not inline around advice |
protected boolean |
Xreweavable
(Experimental) runs weaver in reweavable mode which causes it to create woven classes that can be rewoven, subject to the restriction that on attempting a reweave all the types that advised the woven type must be accessible. |
protected boolean |
XserializableAspects
(Experimental) Normally it is an error to declare aspects Serializable . |
protected boolean |
XterminateAfterCompilation
Causes compiler to terminate before weaving |
Fields inherited from class org.codehaus.mojo.aspectj.AbstractAjcMojo |
---|
aspectLibraries, basedir, project, weaveDependencies, weaveDirectories |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractAjcCompiler()
|
Method Summary | |
---|---|
protected void |
assembleArguments()
Assembles a complete ajc compiler arguments list. |
void |
execute()
Do the AspectJ compiling. |
protected abstract String |
getAdditionalAspectPaths()
Abstract method used by child classes to specify additional aspect paths. |
protected abstract List |
getClasspathDirectories()
Abstract method used by child classes to specify the correct output directory for compiled classes. |
protected Set |
getIncludedSources()
|
protected abstract org.codehaus.plexus.util.Scanner[] |
getJavaSources()
|
protected abstract File |
getOutputDirectory()
The directory where compiled classes go. |
protected abstract List |
getSourceDirectories()
Abstract method used by child classes to specify the correct source directory for classes. |
protected boolean |
isBuildNeeded()
Checks modifications that would make us need a build |
void |
setArgumentFileName(String argumentFileName)
|
void |
setBootClassPath(String bootclasspath)
|
void |
setComplianceLevel(String complianceLevel)
Setters which when called sets compiler arguments |
void |
setDeprecation(boolean deprecation)
|
void |
setEmacssym(boolean emacssym)
|
void |
setEncoding(String encoding)
|
void |
setNoImportError(boolean noImportError)
|
void |
setOutxml(boolean outxml)
|
void |
setOutxmlfile(String outxmlfile)
|
void |
setPreserveAllLocals(boolean preserveAllLocals)
|
void |
setProceedOnError(boolean proceedOnError)
|
void |
setReferenceInfo(boolean referenceInfo)
|
void |
setRepeat(int repeat)
|
void |
setShowWeaveInfo(boolean showWeaveInfo)
|
void |
setSource(String source)
|
void |
setTarget(String target)
|
void |
setVerbose(boolean verbose)
|
void |
setWarn(String warn)
|
void |
setXaddSerialVersionUID(boolean xaddSerialVersionUID)
|
void |
setXhasMember(boolean xhasMember)
|
void |
setXlint(String xlint)
|
void |
setXnoInline(boolean xnoInline)
|
void |
setXreweavable(boolean xreweavable)
|
void |
setXserializableAspects(boolean xserializableAspects)
|
void |
setXterminateAfterCompilation(boolean xterminateAfterCompilation)
|
Methods inherited from class org.codehaus.mojo.aspectj.AbstractAjcMojo |
---|
isSkip |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String aspectDirectory
protected String testAspectDirectory
protected String[] includes
protected String[] excludes
protected String ajdtBuildDefFile
protected boolean outxml
protected String outxmlfile
protected boolean emacssym
protected String Xlint
protected boolean XhasMember
protected String target
protected String source
protected String complianceLevel
protected boolean deprecation
protected boolean noImportError
protected boolean proceedOnError
protected boolean preserveAllLocals
protected boolean referenceInfo
protected String encoding
protected boolean verbose
protected boolean showWeaveInfo
protected int repeat
protected boolean Xreweavable
protected boolean XnoInline
protected boolean XserializableAspects
Serializable
. This option removes that restriction.
protected boolean XaddSerialVersionUID
Serializable
that is
affected by an aspect. The field is calculated based on the class before weaving has taken place.
protected boolean XterminateAfterCompilation
protected String bootclasspath
protected String warn
protected String argumentFileName
protected boolean forceAjcCompile
protected List ajcOptions
protected Set resolvedIncludes
Constructor Detail |
---|
public AbstractAjcCompiler()
Method Detail |
---|
protected abstract List getClasspathDirectories()
protected abstract File getOutputDirectory()
protected abstract List getSourceDirectories()
protected abstract org.codehaus.plexus.util.Scanner[] getJavaSources()
protected abstract String getAdditionalAspectPaths()
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void assembleArguments() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- error in configurationprotected Set getIncludedSources() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected boolean isBuildNeeded() throws org.apache.maven.plugin.MojoExecutionException
true
if build is needed, otherwise false
org.apache.maven.plugin.MojoExecutionException
public void setComplianceLevel(String complianceLevel)
complianceLevel
- the complianceLevelpublic void setDeprecation(boolean deprecation)
public void setEmacssym(boolean emacssym)
public void setEncoding(String encoding)
public void setNoImportError(boolean noImportError)
public void setOutxml(boolean outxml)
public void setOutxmlfile(String outxmlfile)
public void setPreserveAllLocals(boolean preserveAllLocals)
public void setProceedOnError(boolean proceedOnError)
public void setReferenceInfo(boolean referenceInfo)
public void setRepeat(int repeat)
public void setShowWeaveInfo(boolean showWeaveInfo)
public void setTarget(String target)
public void setSource(String source)
public void setVerbose(boolean verbose)
public void setXhasMember(boolean xhasMember)
public void setXlint(String xlint)
public void setXnoInline(boolean xnoInline)
public void setXreweavable(boolean xreweavable)
public void setXserializableAspects(boolean xserializableAspects)
public void setXaddSerialVersionUID(boolean xaddSerialVersionUID)
public void setXterminateAfterCompilation(boolean xterminateAfterCompilation)
public void setBootClassPath(String bootclasspath)
public void setWarn(String warn)
public void setArgumentFileName(String argumentFileName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |