soot
Class BodyTransformer
java.lang.Object
|
+--soot.Transformer
|
+--soot.BodyTransformer
- Direct Known Subclasses:
- Aggregator, ConditionalBranchFolder, ConstantPropagatorAndFolder, ConstructorFolder, CopyPropagator, DeadAssignmentEliminator, LoadStoreOptimizer, LocalNameStandardizer, LocalPacker, LocalSplitter, NaiveCommonSubexpressionEliminator, NopEliminator, PeepholeOptimizer, TypeAssigner, UnconditionalBranchFolder, UnreachableCodeEliminator, UnusedLocalEliminator
- public abstract class BodyTransformer
- extends Transformer
An abstract class which acts on a Body. This class provides a harness and acts as an
interface for classes that wish to transform a Body. Subclasses
provide the actual Body transformation implementation.
Method Summary |
protected java.lang.String |
getDeclaredOptions()
|
java.lang.String |
getDefaultOptions()
|
protected abstract void |
internalTransform(Body b,
java.lang.String phaseName,
java.util.Map options)
This method is called to perform the transformation itself. |
void |
transform(Body b)
Called by clients of the transformation. |
void |
transform(Body b,
java.lang.String phaseName)
Called by clients of the transformation. |
void |
transform(Body b,
java.lang.String phaseName,
java.lang.String optionsString)
Called by clients of the transformation. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
BodyTransformer
public BodyTransformer()
transform
public final void transform(Body b,
java.lang.String phaseName,
java.lang.String optionsString)
- Called by clients of the transformation. Acts as a generic interface
for BodyTransformers.
Calls internalTransform with the optionsString properly set up.
That is, the options in optionsString override those in the Scene.
- Parameters:
b
- the body on which to apply the transformationphaseName
- phaseName for the transform. Used to retrieve options from the Scene.optionsString
-
transform
public final void transform(Body b)
- Called by clients of the transformation. Acts as a generic interface
for BodyTransformers.
- Parameters:
b
- the body on which to apply the transformation
transform
public final void transform(Body b,
java.lang.String phaseName)
- Called by clients of the transformation. Acts as a generic interface
for BodyTransformers.
- Parameters:
b
- the body on which to apply the transformationphaseName
- phaseName for the transform. Used to retrieve options from the Scene.
getDefaultOptions
public java.lang.String getDefaultOptions()
- Returns:
- the default options for this transform.
internalTransform
protected abstract void internalTransform(Body b,
java.lang.String phaseName,
java.util.Map options)
- This method is called to perform the transformation itself. It is declared
abstract; subclasses must implement this method by making it the entry point
to their actual Body transformation.
- Parameters:
b
- the body on which to apply the transformationphaseName
- the phasename for this transform; not typically used by implementations.options
- the actual computed options; a combination of default options and Scene specified options.
getDeclaredOptions
protected java.lang.String getDeclaredOptions()