Interface Pointer
- All Superinterfaces:
Indexable
- All Known Implementing Classes:
ArrayIndex
,CSVar
,InstanceField
,StaticField
Represents all pointers (nodes) in context-sensitive
pointer analysis (pointer flow graph).
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds filter to filter out objects pointed to by this pointer.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.
-
Method Details
-
getPointsToSet
Retrieves the points-to set associated with this pointer.This method may return
null
. We recommend usegetObjects()
andobjects()
for accessing the objects pointed by this pointer after the pointer analysis finishes.- Returns:
- the points-to set associated with this pointer.
-
setPointsToSet
Sets the associated points-to set of this pointer. -
addFilter
Adds filter to filter out objects pointed to by this pointer. -
getFilters
- Returns:
- all filters added to this pointer.
-
getObjects
Safely retrieves context-sensitive objects pointed to by this pointer.- Returns:
- an empty set if
pointer
has not been associated aPointsToSet
; otherwise, returns set of objects in thePointsToSet
.
-
objects
Safely retrieves context-sensitive objects pointed to by this pointer.- Returns:
- an empty stream if
pointer
has not been associated aPointsToSet
; otherwise, returns stream of objects in thePointsToSet
.
-
getOrAddEdge
Adds a pointer flow edgesource
->target
, and returns the edge. If the edge already exists andkind
is notFlowKind.OTHER
,null
is returned. -
getOutEdges
Set<PointerFlowEdge> getOutEdges()- Returns:
- out edges of this pointer in pointer flow graph.
-
getOutDegree
int getOutDegree()- Returns:
- out degree of this pointer in pointer flow graph.
-
getType
Type getType()- Returns:
- the type of this pointer
-