|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
net.nicoulaj.maven.plugins.soot.SootMojo
@Mojo(name="soot", defaultPhase=COMPILE, threadSafe=false) public final class SootMojo
Mojo that invokes Soot.
Nested Class Summary | |
---|---|
static class |
SootMojo.OutputFormat
Values for outputFormat option. |
static class |
SootMojo.SourcePrecedence
Values for sourcePrecedence option. |
static class |
SootMojo.ThrowAnalysis
Values for throwAnalysis option. |
Field Summary | |
---|---|
protected boolean |
allowPhantomRefs
Allow Soot to process a class even if it cannot find all classes referenced by that class. |
protected boolean |
applicationMode
Run in application mode, processing all classes referenced by argument classes. |
protected boolean |
astMetrics
If this flag is set and soot converts java to jimple then AST metrics will be computed. |
protected boolean |
debug
Print various debugging information as Soot runs, particularly from the Baf Body Phase and the Jimple Annotation Pack Phase. |
protected boolean |
debugResolver
Print debugging information about class resolving. |
protected List |
dumpBody
Dump the internal representation of each method before and after given phase. |
protected List |
dumpCfg
Dump the internal representation of each CFG constructed during given phase. |
protected List |
dynamicClasses
Note that class may be loaded dynamically. |
protected List |
dynamicDirectories
Mark all class files in directory as classes that may be loaded dynamically. |
protected List |
dynamicPackages
Marks all class files belonging to the package package or any of its subpackages as classes which the application may load dynamically. |
protected List |
excludes
Exclude classes in pkg from application classes. |
protected boolean |
fullResolver
Normally, Soot resolves only that application classes and any classes that they refer to, along with any classes it needs for the Jimple typing, but it does not transitively resolve references in these additional classes that were resolved only because they were referenced. |
protected boolean |
gzip
GZip IR output files. |
protected boolean |
help
Display the textual help message and exit immediately without further processing. |
protected boolean |
includeAll
Set default excluded packages to empty list. |
protected List |
includes
Include classes in pkg as application classes. |
protected boolean |
interactiveMode
Runs interactively, with Soot providing detailed information as it iterates through intra-procedural analyses. |
protected boolean |
j2me
Use J2ME mode. |
protected boolean |
keepBytecodeOffset
Maintain bytecode offset tables for class files throughout the transformations. |
protected boolean |
keepLineNumber
Keep line number tables. |
protected String |
mainClass
By default, the first class encountered with a main method is treated as the main class (entry point) in whole- program analysis. |
static String |
NAME
Mojo name. |
protected boolean |
noBodiesForExcluded
Prevents Soot from loading method bodies for all excluded classes (see exclude option), even when running in whole-program mode. |
protected boolean |
noOutputInnerClassesAttribute
Don't output inner classes attribute in class files. |
protected boolean |
noOutputSourceFileAttribute
Don't output Source File Attribute when producing class files. |
protected boolean |
omitExceptingUnitEdges
Omit CFG edges to handlers from excepting units which lack side effects. |
protected String |
outputDirectory
Store output files in directory. directory may be relative to the working directory. |
protected SootMojo.OutputFormat |
outputFormat
Specify the format of output files Soot should produce, if any. |
protected boolean |
outputJar
Make output dir a Jar file instead of dir. |
protected List |
phaseHelp
Print a help message about the phase or sub-phase named phase, then exit. |
protected boolean |
phaseList
Print a list of the available phases and sub-phases, then exit. |
protected boolean |
polyglot
Use Java 1.4 Polyglot frontend instead of JastAdd, which supports Java 5 syntax. |
protected boolean |
prependClasspath
Instead of replacing the default soot classpath with the classpath given on the command line, prepent it with that classpath. |
protected boolean |
printTags
Print in output files (either in Jimple or Dave) a variety of tags which Soot has attached to its internal representations of the application classes. |
protected List |
processDirectory
Add all classes found in directory to the set of argument classes which is analyzed and transformed by Soot. |
protected MavenProject |
project
The Maven project. |
protected boolean |
showExceptionDests
Include exception destination edges as well as CFG edges in dumped CFGs. |
protected String |
sootClasspath
Use path as the list of directories in which Soot should search for classes. path should be a series of directories, separated by the path separator character for your system. |
protected SootMojo.SourcePrecedence |
sourcePrecedence
Sets format as Soot's preference for the type of source files to read when it looks for a class. |
protected boolean |
subtractGC
Attempt to subtract time spent in garbage collection from the reports of times required for transformations. |
protected SootMojo.ThrowAnalysis |
throwAnalysis
This option specifies how to estimate the exceptions which each statement may throw when constructing exceptional CFGs. |
protected boolean |
time
Report the time required to perform some of Soot's transformations. |
protected boolean |
unfriendlyMode
With this option, Soot does not stop even if it received no command-line options. |
protected boolean |
validate
Causes internal checks to be done on bodies in the various Soot IRs,to make sure the transformations have not done something strange. |
protected boolean |
verbose
Provide detailed information about what Soot is doing as it runs. |
protected boolean |
version
Display information about the version of Soot being run, then exit without further processing. |
protected boolean |
viaGrimp
Convert Jimple to bytecode via the Grimp intermediate representation instead of via the Baf intermediate representation. |
protected boolean |
viaShimple
Enable Shimple, Soot's SSA representation. |
protected boolean |
wholeProgram
Run in whole program mode, taking into consideration the whole program when performing analyses and transformations. |
protected boolean |
wholeShimple
Run in whole shimple mode, taking into consideration the whole program when performing Shimple analyses and transformations. |
protected boolean |
xmlAttributes
Save in XML format a variety of tags which Soot has attached to its internal representations of the application classes. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
SootMojo()
|
Method Summary | |
---|---|
protected void |
configureLogging()
|
protected void |
configureOptions()
|
void |
execute()
|
protected void |
run()
|
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 |
---|
public static final String NAME
@Parameter(property="project", required=true, readonly=true) protected MavenProject project
@Parameter(defaultValue="false") protected boolean help
@Parameter(defaultValue="false") protected boolean phaseList
@Parameter protected List phaseHelp
@Parameter(defaultValue="false") protected boolean version
@Parameter(defaultValue="false") protected boolean verbose
@Parameter(defaultValue="false") protected boolean interactiveMode
@Parameter(defaultValue="true") protected boolean unfriendlyMode
@Parameter(defaultValue="false") protected boolean applicationMode
@Parameter(defaultValue="false") protected boolean wholeProgram
@Parameter(defaultValue="false") protected boolean wholeShimple
@Parameter(defaultValue="false") protected boolean validate
@Parameter(defaultValue="false") protected boolean debug
@Parameter(defaultValue="false") protected boolean debugResolver
@Parameter(property="project.build.outputDirectory") protected String sootClasspath
@Parameter(defaultValue="true") protected boolean prependClasspath
@Parameter(property="project.build.outputDirectory") protected List processDirectory
@Parameter(defaultValue="TODO") protected boolean astMetrics
@Parameter(defaultValue="CLASS") protected SootMojo.SourcePrecedence sourcePrecedence
@Parameter(defaultValue="false") protected boolean fullResolver
@Parameter(defaultValue="false") protected boolean allowPhantomRefs
@Parameter(defaultValue="false") protected boolean noBodiesForExcluded
@Parameter(defaultValue="false") protected boolean j2me
@Parameter protected String mainClass
@Parameter(defaultValue="false") protected boolean polyglot
@Parameter(property="project.build.outputDirectory") protected String outputDirectory
@Parameter(defaultValue="CLASS") protected SootMojo.OutputFormat outputFormat
@Parameter(defaultValue="false") protected boolean outputJar
outputDirectory
option. Note that if the output
Jar file exists before Soot runs, any files inside it will first be removed.
@Parameter(defaultValue="false") protected boolean xmlAttributes
@Parameter(defaultValue="false") protected boolean printTags
@Parameter(defaultValue="false") protected boolean noOutputSourceFileAttribute
@Parameter(defaultValue="false") protected boolean noOutputInnerClassesAttribute
@Parameter protected List dumpBody
@Parameter protected List dumpCfg
@Parameter(defaultValue="true") protected boolean showExceptionDests
@Parameter(defaultValue="false") protected boolean gzip
@Parameter(defaultValue="false") protected boolean viaGrimp
@Parameter(defaultValue="false") protected boolean viaShimple
@Parameter(defaultValue="UNIT") protected SootMojo.ThrowAnalysis throwAnalysis
@Parameter(defaultValue="false") protected boolean omitExceptingUnitEdges
ExceptionalUnitGraph
or ExceptionalBlockGraph
, include edges to an
exception handler only from the predecessors of an instruction which may throw an exception to the handler, and
not from the excepting instruction itself, unless the excepting instruction has potential side effects.
Omitting edges from excepting units allows more accurate flow analyses (since if an instruction without side
effects throws an exception, it has not changed the state of the computation). This accuracy, though, could lead
optimizations to generate unverifiable code, since the dataflow analyses performed by bytecode verifiers might
include paths to exception handlers from all protected instructions, regardless of whether the instructions have
side effects. (In practice, the pedantic throw analysis suffices to pass verification in all VMs tested with Soot
to date, but the JVM specification does allow for less discriminating verifiers which would reject some code that
might be generated using the pedantic throw analysis without also adding edges from all excepting units.)
@Parameter protected List includes
@Parameter protected List excludes
@Parameter(defaultValue="TODO") protected boolean includeAll
@Parameter protected List dynamicClasses
@Parameter protected List dynamicDirectories
@Parameter protected List dynamicPackages
@Parameter(defaultValue="true") protected boolean keepLineNumber
@Parameter(defaultValue="false") protected boolean keepBytecodeOffset
@Parameter(defaultValue="false") protected boolean time
@Parameter(defaultValue="false") protected boolean subtractGC
Constructor Detail |
---|
public SootMojo()
Method Detail |
---|
public void execute() throws MojoExecutionException, MojoFailureException
MojoExecutionException
MojoFailureException
protected void configureLogging()
protected void configureOptions()
protected void run() throws MojoFailureException
MojoFailureException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |