public class ControlFlowAnalyzer extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ControlFlowAnalyzer.DependencyRecorder
A callback for recording control-flow dependencies as they are discovered.
|
Constructor and Description |
---|
ControlFlowAnalyzer(ControlFlowAnalyzer cfa) |
ControlFlowAnalyzer(JProgram program) |
Modifier and Type | Method and Description |
---|---|
Set<JField> |
getFieldsWritten()
Return the set of all fields that are written.
|
Set<JReferenceType> |
getInstantiatedTypes()
Return the complete set of types that have been instantiated.
|
Set<? extends JNode> |
getLiveFieldsAndMethods()
Return all methods that could be executed, and all variables that could be
read, based on the given entry points so far.
|
Set<String> |
getLiveStrings() |
Set<? extends JReferenceType> |
getReferencedTypes()
Return the complete set of types that have been referenced.
|
void |
setDependencyRecorder(ControlFlowAnalyzer.DependencyRecorder dr)
Specify the
ControlFlowAnalyzer.DependencyRecorder to be used for future traversals. |
void |
setForPruning() |
void |
traverseEntryMethods()
Traverse the program entry points, but don't traverse any runAsync
fragments.
|
void |
traverseEverything() |
void |
traverseFrom(JMethod method)
Assume
method is live, and find out what else might execute. |
void |
traverseFromInstantiationOf(JDeclaredType type)
Assume
type is instantiated, and find out what else will
execute as a result. |
void |
traverseFromReferenceTo(JDeclaredType type) |
void |
traverseFromRunAsync(JRunAsync runAsync)
Traverse the fragment for a specific runAsync.
|
void |
traverseFromRunAsyncs()
Traverse the fragments for all runAsyncs.
|
public ControlFlowAnalyzer(ControlFlowAnalyzer cfa)
public ControlFlowAnalyzer(JProgram program)
public Set<JField> getFieldsWritten()
public Set<JReferenceType> getInstantiatedTypes()
public Set<? extends JNode> getLiveFieldsAndMethods()
public Set<? extends JReferenceType> getReferencedTypes()
public void setDependencyRecorder(ControlFlowAnalyzer.DependencyRecorder dr)
ControlFlowAnalyzer.DependencyRecorder
to be used for future traversals.
Specifying null
means to stop recording dependencies.public void setForPruning()
public void traverseEntryMethods()
public void traverseEverything()
public void traverseFrom(JMethod method)
method
is live, and find out what else might execute.public void traverseFromInstantiationOf(JDeclaredType type)
type
is instantiated, and find out what else will
execute as a result.public void traverseFromReferenceTo(JDeclaredType type)
public void traverseFromRunAsync(JRunAsync runAsync)
public void traverseFromRunAsyncs()
Copyright © 2018. All rights reserved.