Package com.ibm.wala.analysis.reflection
Class FactoryBypassInterpreter
- java.lang.Object
-
- com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter
-
- com.ibm.wala.analysis.reflection.FactoryBypassInterpreter
-
- All Implemented Interfaces:
CHAContextInterpreter
,RTAContextInterpreter
,SSAContextInterpreter
public class FactoryBypassInterpreter extends AbstractReflectionInterpreter
Logic to interpret "factory" methods in context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FactoryBypassInterpreter.SpecializedFactoryMethod
-
Nested classes/interfaces inherited from class com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter
AbstractReflectionInterpreter.IgnoreSerializableWarning, AbstractReflectionInterpreter.ManySubtypesWarning, AbstractReflectionInterpreter.NoSubtypesWarning, AbstractReflectionInterpreter.SpecializedMethod
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter
cache, CONE_BOUND, DEBUG, indexLocal, options, typeIndexMap
-
-
Constructor Summary
Constructors Constructor Description FactoryBypassInterpreter(AnalysisOptions options, IAnalysisCacheView iAnalysisCacheView)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<TypeReference>
getCaughtExceptions(CGNode node)
ControlFlowGraph<SSAInstruction,ISSABasicBlock>
getCFG(CGNode N)
DefUse
getDU(CGNode node)
java.util.Iterator<SSAInstruction>
getInvokeStatements(CGNode node)
IR
getIR(CGNode node)
IRView
getIRView(CGNode node)
int
getNumberOfStatements(CGNode node)
boolean
hasObjectArrayLoad(CGNode node)
boolean
hasObjectArrayStore(CGNode node)
java.util.Iterator<CallSiteReference>
iterateCallSites(CGNode node)
java.util.Iterator<TypeReference>
iterateCastTypes(CGNode node)
java.util.Iterator<FieldReference>
iterateFieldsRead(CGNode node)
java.util.Iterator<FieldReference>
iterateFieldsWritten(CGNode node)
java.util.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
recordType(IClassHierarchy cha, Context context, TypeReference type)
boolean
understands(CGNode node)
Does this object understand the given method? The caller had better check this before inquiring on other properties.-
Methods inherited from class com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter
getCallSiteForType, getExceptionsForType, getLocalForType, getNewSiteForType, typeRef2TypeAbstraction
-
-
-
-
Constructor Detail
-
FactoryBypassInterpreter
public FactoryBypassInterpreter(AnalysisOptions options, IAnalysisCacheView iAnalysisCacheView)
- Parameters:
options
- governing analysis options
-
-
Method Detail
-
getIR
public IR getIR(CGNode node)
- Returns:
- the IR that models the method context, or null if it's an unmodelled native method
-
getNumberOfStatements
public int getNumberOfStatements(CGNode node)
- Returns:
- the number of the statements in the IR, or -1 if it's an unmodelled native method.
- See Also:
SSAContextInterpreter.getNumberOfStatements(com.ibm.wala.ipa.callgraph.CGNode)
-
understands
public boolean understands(CGNode node)
Description copied from interface:CHAContextInterpreter
Does this object understand the given method? The caller had better check this before inquiring on other properties.
-
iterateNewSites
public java.util.Iterator<NewSiteReference> iterateNewSites(CGNode node)
- Returns:
- an Iterator of the types that may be allocated by a given method in a given context.
-
getInvokeStatements
public java.util.Iterator<SSAInstruction> getInvokeStatements(CGNode node)
-
iterateCallSites
public java.util.Iterator<CallSiteReference> iterateCallSites(CGNode node)
- Returns:
- an Iterator of the call statements that may execute in a given method for a given context
-
recordType
public boolean recordType(IClassHierarchy cha, Context context, TypeReference type)
-
recordFactoryType
public boolean recordFactoryType(CGNode node, IClass klass)
Description copied from interface:RTAContextInterpreter
record that the "factory" method of a node should be interpreted to allocate a particular class.TODO: this is a little ugly, is there a better place to move this?
- Returns:
- true iff a NEW type was recorded, false if the type was previously recorded.
- See Also:
RTAContextInterpreter.recordFactoryType(com.ibm.wala.ipa.callgraph.CGNode, com.ibm.wala.classLoader.IClass)
-
iterateFieldsRead
public java.util.Iterator<FieldReference> iterateFieldsRead(CGNode node)
- Returns:
- iterator of FieldReference
-
iterateFieldsWritten
public java.util.Iterator<FieldReference> iterateFieldsWritten(CGNode node)
- Returns:
- iterator of FieldReference
-
getCaughtExceptions
public java.util.Set<TypeReference> getCaughtExceptions(CGNode node)
-
hasObjectArrayLoad
public boolean hasObjectArrayLoad(CGNode node)
-
hasObjectArrayStore
public boolean hasObjectArrayStore(CGNode node)
-
iterateCastTypes
public java.util.Iterator<TypeReference> iterateCastTypes(CGNode node)
-
getCFG
public ControlFlowGraph<SSAInstruction,ISSABasicBlock> getCFG(CGNode N)
-
-