Class DefaultInstantiationBehavior
- java.lang.Object
-
- com.ibm.wala.dalvik.ipa.callgraph.androidModel.parameters.IInstantiationBehavior
-
- com.ibm.wala.dalvik.ipa.callgraph.androidModel.parameters.DefaultInstantiationBehavior
-
- All Implemented Interfaces:
Serializable
public class DefaultInstantiationBehavior extends IInstantiationBehavior implements Serializable
Contains some predefined behaviors.- Since:
- 2013-10-25
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.parameters.IInstantiationBehavior
IInstantiationBehavior.Exactness, IInstantiationBehavior.InstanceBehavior
-
-
Field Summary
Fields Modifier and Type Field Description boolean
serializationIncludesCache
Including the cache may be useful to get all seen types.
-
Constructor Summary
Constructors Constructor Description DefaultInstantiationBehavior(IClassHierarchy cha)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IInstantiationBehavior.InstanceBehavior
getBehavior(TypeName type, TypeName asParameterTo, MethodReference inCall, String withName)
Returns how the model should behave on the type.IInstantiationBehavior.InstanceBehavior
getDafultBehavior()
IInstantiationBehavior.Exactness
getExactness(TypeName type, TypeName asParameterTo, MethodReference inCall, String withName)
The Exactness depends on how the behavior to a type was determined.protected static Atom
type2atom(TypeName type)
Convert a TypeName back to an Atom.-
Methods inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.parameters.IInstantiationBehavior
getBehavior
-
-
-
-
Constructor Detail
-
DefaultInstantiationBehavior
public DefaultInstantiationBehavior(IClassHierarchy cha)
-
-
Method Detail
-
getBehavior
public IInstantiationBehavior.InstanceBehavior getBehavior(TypeName type, TypeName asParameterTo, MethodReference inCall, String withName)
Returns how the model should behave on the type. See the documentation of#InstanceBehavior
for the description of the possible behaviours. Although this function takes a parameter withName one should not rely on its value.- Specified by:
getBehavior
in classIInstantiationBehavior
- Parameters:
asParameterTo
- not consideredinCall
- not consideredwithName
- not consideredtype
- The type of the variable in question- Returns:
- The behaviour to use
-
getExactness
public IInstantiationBehavior.Exactness getExactness(TypeName type, TypeName asParameterTo, MethodReference inCall, String withName)
The Exactness depends on how the behavior to a type was determined. 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- Specified by:
getExactness
in classIInstantiationBehavior
-
getDafultBehavior
public IInstantiationBehavior.InstanceBehavior getDafultBehavior()
- Specified by:
getDafultBehavior
in classIInstantiationBehavior
- Returns:
- InstanceBehavior.REUSE
-
-