Class MockObj

java.lang.Object
pascal.taie.analysis.pta.core.heap.Obj
pascal.taie.analysis.pta.core.heap.MockObj
All Implemented Interfaces:
Indexable

public class MockObj extends Obj
Represents the objects whose allocation sites are not explicitly written in the program.
  • Constructor Details

  • Method Details

    • getDescriptor

      public Descriptor getDescriptor()
    • getType

      public Type getType()
      Specified by:
      getType in class Obj
      Returns:
      the type of the object.
    • getAllocation

      public Object getAllocation()
      Specified by:
      getAllocation in class Obj
      Returns:
      the allocation of the object.
    • getContainerMethod

      public Optional<JMethod> getContainerMethod()
      Specified by:
      getContainerMethod in class Obj
      Returns:
      the method containing the allocation site of this object. For some special objects, e.g., string constants, which are not allocated in any method, this API returns an empty Optional.
    • getContainerType

      public Type getContainerType()
      Description copied from class: Obj
      This method is useful for type sensitivity.
      Specified by:
      getContainerType in class Obj
      Returns:
      the type containing the allocation site of this object. For special objects, the return values of this method are also special.
    • isFunctional

      public boolean isFunctional()
      Description copied from class: Obj
      An object is functional means that it can hold fields (or array indexes).
      Overrides:
      isFunctional in class Obj
      Returns:
      true if this is a function Obj.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object