Class StaticField

java.lang.Object
pascal.taie.analysis.pta.core.cs.element.StaticField
All Implemented Interfaces:
Pointer, Indexable

public class StaticField extends Object
Represents static field pointers.
  • Method Details

    • getField

      public JField getField()
      Returns:
      the corresponding static field of the StaticField pointer.
    • getType

      public Type getType()
      Returns:
      the type of this pointer
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIndex

      public int getIndex()
      Specified by:
      getIndex in interface Indexable
      Returns:
      index of this object. The index should be a non-negative integer.
    • getPointsToSet

      public PointsToSet getPointsToSet()
      Description copied from interface: Pointer
      Retrieves the points-to set associated with this pointer.

      This method may return null. We recommend use Pointer.getObjects() and Pointer.objects() for accessing the objects pointed by this pointer after the pointer analysis finishes.

      Specified by:
      getPointsToSet in interface Pointer
      Returns:
      the points-to set associated with this pointer.
    • setPointsToSet

      public void setPointsToSet(PointsToSet pointsToSet)
      Description copied from interface: Pointer
      Sets the associated points-to set of this pointer.
      Specified by:
      setPointsToSet in interface Pointer
    • addFilter

      public void addFilter(Predicate<CSObj> filter)
      Description copied from interface: Pointer
      Adds filter to filter out objects pointed to by this pointer.
      Specified by:
      addFilter in interface Pointer
    • getFilters

      public Set<Predicate<CSObj>> getFilters()
      Specified by:
      getFilters in interface Pointer
      Returns:
      all filters added to this pointer.
    • getObjects

      public Set<CSObj> getObjects()
      Description copied from interface: Pointer
      Safely retrieves context-sensitive objects pointed to by this pointer.
      Specified by:
      getObjects in interface Pointer
      Returns:
      an empty set if pointer has not been associated a PointsToSet; otherwise, returns set of objects in the PointsToSet.
    • objects

      public Stream<CSObj> objects()
      Description copied from interface: Pointer
      Safely retrieves context-sensitive objects pointed to by this pointer.
      Specified by:
      objects in interface Pointer
      Returns:
      an empty stream if pointer has not been associated a PointsToSet; otherwise, returns stream of objects in the PointsToSet.
    • getOrAddEdge

      public PointerFlowEdge getOrAddEdge(FlowKind kind, Pointer source, Pointer target)
      Description copied from interface: Pointer
      Adds a pointer flow edge source -> target, and returns the edge. If the edge already exists and kind is not FlowKind.OTHER, null is returned.
      Specified by:
      getOrAddEdge in interface Pointer
    • getOutEdges

      public Set<PointerFlowEdge> getOutEdges()
      Specified by:
      getOutEdges in interface Pointer
      Returns:
      out edges of this pointer in pointer flow graph.
    • getOutDegree

      public int getOutDegree()
      Specified by:
      getOutDegree in interface Pointer
      Returns:
      out degree of this pointer in pointer flow graph.