Package edu.umd.cs.findbugs.ba
Class Edge
- All Implemented Interfaces:
Debug
,EdgeTypes
,GraphEdge<Edge,
,BasicBlock> Comparable<Edge>
An edge of a control flow graph.
- Author:
- David Hovemeyer
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from interface edu.umd.cs.findbugs.ba.Debug
VERIFY_INTEGRITY
Fields inherited from interface edu.umd.cs.findbugs.ba.EdgeTypes
BACKEDGE_SOURCE_EDGE, BACKEDGE_TARGET_EDGE, CHECKED_EXCEPTIONS_FLAG, EXIT_EDGE, EXPLICIT_EXCEPTIONS_FLAG, FALL_THROUGH_EDGE, GOTO_EDGE, HANDLED_EXCEPTION_EDGE, IFCMP_EDGE, JSR_EDGE, RET_EDGE, RETURN_EDGE, START_EDGE, SWITCH_DEFAULT_EDGE, SWITCH_EDGE, UNHANDLED_EXCEPTION_EDGE, UNKNOWN_EDGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compare with other edge.static String
edgeTypeToString
(int edgeType) Get string representing given edge type.boolean
formatAsString
(boolean reverse) Return a string representation of the edge.int
getFlags()
Get the edge flags.int
getId()
int
getType()
Get the type of edge.int
hashCode()
boolean
boolean
Is the edge an exception edge?boolean
isFlagSet
(int flag) Return if given edge flag is set.void
setFlags
(int flags) Set the edge flags.void
setType
(int type) Set the type of edge.boolean
sourceIsTopOfLoop
(Set<Integer> positions) static int
Get numeric edge type from string representation.toString()
Methods inherited from class edu.umd.cs.findbugs.graph.AbstractEdge
getLabel, getSource, getTarget, setLabel
-
Constructor Details
-
Edge
Constructor.- Parameters:
source
- source basic blockdest
- destination basic block
-
-
Method Details
-
getId
public int getId() -
getType
Get the type of edge. -
setType
Set the type of edge. -
getFlags
public int getFlags()Get the edge flags. -
setFlags
public void setFlags(int flags) Set the edge flags. -
isFlagSet
public boolean isFlagSet(int flag) Return if given edge flag is set.- Parameters:
flag
- the edge flag- Returns:
- true if the flag is set, false otherwise
-
isExceptionEdge
public boolean isExceptionEdge()Is the edge an exception edge? -
equals
- Overrides:
equals
in classAbstractEdge<Edge,
BasicBlock>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractEdge<Edge,
BasicBlock>
-
compareTo
Compare with other edge.- Specified by:
compareTo
in interfaceComparable<Edge>
- Overrides:
compareTo
in classAbstractEdge<Edge,
BasicBlock>
-
toString
-
isBackwardInBytecode
public boolean isBackwardInBytecode() -
sourceIsTopOfLoop
-
formatAsString
Return a string representation of the edge. -
edgeTypeToString
Get string representing given edge type. -
stringToEdgeType
Get numeric edge type from string representation.
-