Class SpecializedInstantiator
java.lang.Object
com.ibm.wala.dalvik.ipa.callgraph.androidModel.parameters.FlatInstantiator
com.ibm.wala.dalvik.ipa.callgraph.androidModel.parameters.SpecializedInstantiator
- All Implemented Interfaces:
com.ibm.wala.core.util.ssa.IInstantiator
Instantiates certain android-types differently.
For example instantiating an android.content.Context would pull in all Android-components in scope resulting in a massivly overapproximated model.
-
Constructor Summary
ConstructorsConstructorDescriptionSpecializedInstantiator(com.ibm.wala.ipa.summaries.VolatileMethodSummary body, com.ibm.wala.core.util.ssa.TypeSafeInstructionFactory instructionFactory, com.ibm.wala.core.util.ssa.SSAValueManager pm, com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.types.MethodReference scope, com.ibm.wala.ipa.callgraph.AnalysisScope analysisScope, com.ibm.wala.core.util.ssa.IInstantiator parent) -
Method Summary
Modifier and TypeMethodDescriptioncom.ibm.wala.core.util.ssa.SSAValuecreateContext(com.ibm.wala.types.TypeReference T, com.ibm.wala.core.util.ssa.SSAValue.VariableKey key) Creates a new instance of android/content/Context.com.ibm.wala.core.util.ssa.SSAValuecreateContextWrapper(com.ibm.wala.types.TypeReference T, com.ibm.wala.core.util.ssa.SSAValue.VariableKey key) com.ibm.wala.core.util.ssa.SSAValuecreateInstance(com.ibm.wala.types.TypeReference T, boolean asManaged, com.ibm.wala.core.util.ssa.SSAValue.VariableKey key, Set<? extends com.ibm.wala.core.util.ssa.SSAValue> seen) Creates a new instance of type calling all that's necessary.intcreateInstance(com.ibm.wala.types.TypeReference type, Object... instantiatorArgs) Satisfy the interface.static booleanunderstands(com.ibm.wala.types.TypeReference T) Methods inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.parameters.FlatInstantiator
addCallCtor
-
Constructor Details
-
SpecializedInstantiator
public SpecializedInstantiator(com.ibm.wala.ipa.summaries.VolatileMethodSummary body, com.ibm.wala.core.util.ssa.TypeSafeInstructionFactory instructionFactory, com.ibm.wala.core.util.ssa.SSAValueManager pm, com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.types.MethodReference scope, com.ibm.wala.ipa.callgraph.AnalysisScope analysisScope, com.ibm.wala.core.util.ssa.IInstantiator parent)
-
-
Method Details
-
createInstance
public com.ibm.wala.core.util.ssa.SSAValue createInstance(com.ibm.wala.types.TypeReference T, boolean asManaged, com.ibm.wala.core.util.ssa.SSAValue.VariableKey key, Set<? extends com.ibm.wala.core.util.ssa.SSAValue> seen) Creates a new instance of type calling all that's necessary.If T is a class-type all its constructors are searched for the one found best suited (takes the least arguments, ...). New instances are created for all parameters, then the constructor is called.
If T represents multiple types (is an interface, abstract class, ...) _all_ implementors of that type are instantiated After that they get Phi-ed together.
If T is an array-type a new array of length 1 is generated.
TODO: Do we want to mix in REUSE-Parameters?
- Overrides:
createInstancein classFlatInstantiator
-
understands
public static boolean understands(com.ibm.wala.types.TypeReference T) -
createContext
public com.ibm.wala.core.util.ssa.SSAValue createContext(com.ibm.wala.types.TypeReference T, com.ibm.wala.core.util.ssa.SSAValue.VariableKey key) Creates a new instance of android/content/Context. -
createContextWrapper
public com.ibm.wala.core.util.ssa.SSAValue createContextWrapper(com.ibm.wala.types.TypeReference T, com.ibm.wala.core.util.ssa.SSAValue.VariableKey key) -
createInstance
Satisfy the interface.- Specified by:
createInstancein interfacecom.ibm.wala.core.util.ssa.IInstantiator- Overrides:
createInstancein classFlatInstantiator
-