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
Contains some predefined behaviors.
Since:
2013-10-25
See Also:
  • Field Details

    • serializationIncludesCache

      public transient boolean serializationIncludesCache
      Including the cache may be useful to get all seen types.
  • Constructor Details

    • DefaultInstantiationBehavior

      public DefaultInstantiationBehavior(com.ibm.wala.ipa.cha.IClassHierarchy cha)
  • Method Details

    • getBehavior

      public IInstantiationBehavior.InstanceBehavior getBehavior(com.ibm.wala.types.TypeName type, com.ibm.wala.types.TypeName asParameterTo, com.ibm.wala.types.MethodReference inCall, String withName)
      Description copied from class: IInstantiationBehavior
      Returns how the model should behave on the type.

      See 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.

      Specified by:
      getBehavior in class IInstantiationBehavior
      Parameters:
      asParameterTo - not considered
      inCall - not considered
      withName - not considered
      type - The type of the variable in question
      Returns:
      The behaviour to use
    • getExactness

      public IInstantiationBehavior.Exactness getExactness(com.ibm.wala.types.TypeName type, com.ibm.wala.types.TypeName asParameterTo, com.ibm.wala.types.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 class IInstantiationBehavior
    • getDafultBehavior

      public IInstantiationBehavior.InstanceBehavior getDafultBehavior()
      Specified by:
      getDafultBehavior in class IInstantiationBehavior
      Returns:
      InstanceBehavior.REUSE
    • type2atom

      protected static com.ibm.wala.core.util.strings.Atom type2atom(com.ibm.wala.types.TypeName type)
      Convert a TypeName back to an Atom.