public class FlatInstantiator
extends java.lang.Object
implements com.ibm.wala.util.ssa.IInstantiator
This variant limits recursion depth.
| Constructor and Description |
|---|
FlatInstantiator(com.ibm.wala.ipa.summaries.VolatileMethodSummary body,
com.ibm.wala.util.ssa.TypeSafeInstructionFactory instructionFactory,
com.ibm.wala.util.ssa.SSAValueManager pm,
com.ibm.wala.ipa.cha.IClassHierarchy cha,
com.ibm.wala.types.MethodReference scope,
com.ibm.wala.ipa.callgraph.AnalysisScope analysisScope) |
FlatInstantiator(com.ibm.wala.ipa.summaries.VolatileMethodSummary body,
com.ibm.wala.util.ssa.TypeSafeInstructionFactory instructionFactory,
com.ibm.wala.util.ssa.SSAValueManager pm,
com.ibm.wala.ipa.cha.IClassHierarchy cha,
com.ibm.wala.types.MethodReference scope,
com.ibm.wala.ipa.callgraph.AnalysisScope analysisScope,
int maxDepth) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCallCtor(com.ibm.wala.util.ssa.SSAValue self,
com.ibm.wala.types.MethodReference ctor,
java.util.List<com.ibm.wala.util.ssa.SSAValue> ctorParams)
Add a call to the given constructor to the body.
|
com.ibm.wala.util.ssa.SSAValue |
createInstance(com.ibm.wala.types.TypeReference T,
boolean asManaged,
com.ibm.wala.util.ssa.SSAValue.VariableKey key,
java.util.Set<? extends com.ibm.wala.util.ssa.SSAValue> seen)
Creates a new instance of type calling all that's necessary.
|
int |
createInstance(com.ibm.wala.types.TypeReference type,
java.lang.Object... instantiatorArgs)
Satisfy the interface.
|
public FlatInstantiator(com.ibm.wala.ipa.summaries.VolatileMethodSummary body,
com.ibm.wala.util.ssa.TypeSafeInstructionFactory instructionFactory,
com.ibm.wala.util.ssa.SSAValueManager pm,
com.ibm.wala.ipa.cha.IClassHierarchy cha,
com.ibm.wala.types.MethodReference scope,
com.ibm.wala.ipa.callgraph.AnalysisScope analysisScope)
public FlatInstantiator(com.ibm.wala.ipa.summaries.VolatileMethodSummary body,
com.ibm.wala.util.ssa.TypeSafeInstructionFactory instructionFactory,
com.ibm.wala.util.ssa.SSAValueManager pm,
com.ibm.wala.ipa.cha.IClassHierarchy cha,
com.ibm.wala.types.MethodReference scope,
com.ibm.wala.ipa.callgraph.AnalysisScope analysisScope,
int maxDepth)
public com.ibm.wala.util.ssa.SSAValue createInstance(com.ibm.wala.types.TypeReference T,
boolean asManaged,
com.ibm.wala.util.ssa.SSAValue.VariableKey key,
java.util.Set<? extends com.ibm.wala.util.ssa.SSAValue> seen)
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?
protected void addCallCtor(com.ibm.wala.util.ssa.SSAValue self,
com.ibm.wala.types.MethodReference ctor,
java.util.List<com.ibm.wala.util.ssa.SSAValue> ctorParams)
self - the "this" to call the constructor onctor - the constructor to callctorParams - parameters to the ctor _without_ implicit thispublic int createInstance(com.ibm.wala.types.TypeReference type,
java.lang.Object... instantiatorArgs)
createInstance in interface com.ibm.wala.util.ssa.IInstantiator