public class IntentContextInterpreter extends Object implements SSAContextInterpreter
SSAContextInterpreter
that redirects functions that start Android-Components.
The Starter-Functions (listed in IntentStarters) are replaced by a Model that emulates Android Lifecycle
based on their Target (Internal, External, ...): A wrapper around the single models is generated dynamically
(by the models themselves) to resemble the signature of the replaced function.
Methods are replacement by generating a adapted Intermediate Representation of this function on every
occurrence of a call to it.IntentContextSelector
,
IntentStarters
,
MicroModel
,
ExternalModel
Constructor and Description |
---|
IntentContextInterpreter(IClassHierarchy cha,
AnalysisOptions options,
AnalysisCache cache) |
Modifier and Type | Method and Description |
---|---|
ControlFlowGraph<SSAInstruction,ISSABasicBlock> |
getCFG(CGNode node) |
DefUse |
getDU(CGNode node) |
IR |
getIR(CGNode node)
Generates an adapted IR of the managed functions on each call.
|
int |
getNumberOfStatements(CGNode node) |
Iterator<CallSiteReference> |
iterateCallSites(CGNode node) |
Iterator<FieldReference> |
iterateFieldsRead(CGNode node) |
Iterator<FieldReference> |
iterateFieldsWritten(CGNode node) |
Iterator<NewSiteReference> |
iterateNewSites(CGNode node) |
boolean |
recordFactoryType(CGNode node,
IClass klass)
record that the "factory" method of a node should be interpreted to allocate a particular class.
|
boolean |
understands(CGNode node)
If the function associated with the node is handled by this class.
|
public IntentContextInterpreter(IClassHierarchy cha, AnalysisOptions options, AnalysisCache cache)
public IR getIR(CGNode node)
getIR
in interface SSAContextInterpreter
node
- The function to create the IR ofIllegalArgumentException
- on a node of nullpublic boolean understands(CGNode node)
understands
in interface CHAContextInterpreter
IllegalArgumentException
- if the given node is nullpublic Iterator<NewSiteReference> iterateNewSites(CGNode node)
iterateNewSites
in interface RTAContextInterpreter
public Iterator<CallSiteReference> iterateCallSites(CGNode node)
iterateCallSites
in interface CHAContextInterpreter
public ControlFlowGraph<SSAInstruction,ISSABasicBlock> getCFG(CGNode node)
getCFG
in interface SSAContextInterpreter
public int getNumberOfStatements(CGNode node)
getNumberOfStatements
in interface SSAContextInterpreter
public DefUse getDU(CGNode node)
getDU
in interface SSAContextInterpreter
public boolean recordFactoryType(CGNode node, IClass klass)
RTAContextInterpreter
recordFactoryType
in interface RTAContextInterpreter
public Iterator<FieldReference> iterateFieldsWritten(CGNode node)
iterateFieldsWritten
in interface RTAContextInterpreter
public Iterator<FieldReference> iterateFieldsRead(CGNode node)
iterateFieldsRead
in interface RTAContextInterpreter