Class StaticField
java.lang.Object
pascal.taie.analysis.pta.core.cs.element.StaticField
Represents static field pointers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds filter to filter out objects pointed to by this pointer.getField()
int
getIndex()
Safely retrieves context-sensitive objects pointed to by this pointer.getOrAddEdge
(FlowKind kind, Pointer source, Pointer target) Adds a pointer flow edgesource
->target
, and returns the edge.int
Retrieves the points-to set associated with this pointer.getType()
objects()
Safely retrieves context-sensitive objects pointed to by this pointer.void
setPointsToSet
(PointsToSet pointsToSet) Sets the associated points-to set of this pointer.toString()
-
Method Details
-
getField
- Returns:
- the corresponding static field of the StaticField pointer.
-
getType
- Returns:
- the type of this pointer
-
toString
-
getIndex
public int getIndex() -
getPointsToSet
Description copied from interface:Pointer
Retrieves the points-to set associated with this pointer.This method may return
null
. We recommend usePointer.getObjects()
andPointer.objects()
for accessing the objects pointed by this pointer after the pointer analysis finishes.- Specified by:
getPointsToSet
in interfacePointer
- Returns:
- the points-to set associated with this pointer.
-
setPointsToSet
Description copied from interface:Pointer
Sets the associated points-to set of this pointer.- Specified by:
setPointsToSet
in interfacePointer
-
addFilter
Description copied from interface:Pointer
Adds filter to filter out objects pointed to by this pointer. -
getFilters
- Specified by:
getFilters
in interfacePointer
- Returns:
- all filters added to this pointer.
-
getObjects
Description copied from interface:Pointer
Safely retrieves context-sensitive objects pointed to by this pointer.- Specified by:
getObjects
in interfacePointer
- Returns:
- an empty set if
pointer
has not been associated aPointsToSet
; otherwise, returns set of objects in thePointsToSet
.
-
objects
Description copied from interface:Pointer
Safely retrieves context-sensitive objects pointed to by this pointer. -
getOrAddEdge
Description copied from interface:Pointer
Adds a pointer flow edgesource
->target
, and returns the edge. If the edge already exists andkind
is notFlowKind.OTHER
,null
is returned.- Specified by:
getOrAddEdge
in interfacePointer
-
getOutEdges
- Specified by:
getOutEdges
in interfacePointer
- Returns:
- out edges of this pointer in pointer flow graph.
-
getOutDegree
public int getOutDegree()- Specified by:
getOutDegree
in interfacePointer
- Returns:
- out degree of this pointer in pointer flow graph.
-