public class DefaultInstantiationBehavior extends IInstantiationBehavior
IInstantiationBehavior.Exactness, IInstantiationBehavior.InstanceBehavior| Modifier and Type | Field and Description |
|---|---|
boolean |
serializationIncludesCache
Including the cache may be useful to get all seen types.
|
| Constructor and Description |
|---|
DefaultInstantiationBehavior(com.ibm.wala.ipa.cha.IClassHierarchy cha) |
| Modifier and Type | Method and Description |
|---|---|
IInstantiationBehavior.InstanceBehavior |
getBehavior(com.ibm.wala.types.TypeName type,
com.ibm.wala.types.TypeName asParameterTo,
com.ibm.wala.types.MethodReference inCall,
java.lang.String withName)
Returns how the model should behave on the type.
|
IInstantiationBehavior.InstanceBehavior |
getDafultBehavior() |
IInstantiationBehavior.Exactness |
getExactness(com.ibm.wala.types.TypeName type,
com.ibm.wala.types.TypeName asParameterTo,
com.ibm.wala.types.MethodReference inCall,
java.lang.String withName)
The Exactness depends on how the behavior to a type was determined.
|
protected static com.ibm.wala.util.strings.Atom |
type2atom(com.ibm.wala.types.TypeName type)
Convert a TypeName back to an Atom.
|
getBehaviorpublic transient boolean serializationIncludesCache
public DefaultInstantiationBehavior(com.ibm.wala.ipa.cha.IClassHierarchy cha)
public IInstantiationBehavior.InstanceBehavior getBehavior(com.ibm.wala.types.TypeName type, com.ibm.wala.types.TypeName asParameterTo, com.ibm.wala.types.MethodReference inCall, java.lang.String withName)
IInstantiationBehaviorSee the documentation of IInstantiationBehavior.InstanceBehavior for the description of the possible
behaviours.
Although this function takes a parameter withName one should not rely on its value.
getBehavior in class IInstantiationBehaviorasParameterTo - not consideredinCall - not consideredwithName - not consideredtype - The type of the variable in questionpublic IInstantiationBehavior.Exactness getExactness(com.ibm.wala.types.TypeName type, com.ibm.wala.types.TypeName asParameterTo, com.ibm.wala.types.MethodReference inCall, java.lang.String withName)
Currently it has no effect on the model but it may come in handy if you want to cascade classes for determining the IInstanciationBehavior.
The DefaultInstanciationBehavior only knows EXACT, PACKAGE, PREFIX and DEFAULT
getExactness in class IInstantiationBehaviorpublic IInstantiationBehavior.InstanceBehavior getDafultBehavior()
getDafultBehavior in class IInstantiationBehaviorprotected static com.ibm.wala.util.strings.Atom type2atom(com.ibm.wala.types.TypeName type)