Class Edge
- All Implemented Interfaces:
Debug, EdgeTypes, GraphEdge<Edge, BasicBlock>, Comparable<Edge>
An edge of a control flow graph.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface Debug
VERIFY_INTEGRITYFields inherited from interface 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompare with other edge.static StringedgeTypeToString(int edgeType) Get string representing given edge type.booleanformatAsString(boolean reverse) Return a string representation of the edge.intgetFlags()Get the edge flags.intgetId()intgetType()Get the type of edge.inthashCode()booleanbooleanIs the edge an exception edge?booleanisFlagSet(int flag) Return if given edge flag is set.voidsetFlags(int flags) Set the edge flags.voidsetType(int type) Set the type of edge.booleansourceIsTopOfLoop(Set<Integer> positions) static intGet numeric edge type from string representation.toString()Methods inherited from class AbstractEdge
getLabel, getSource, getTarget, setLabel
-
Field Details
-
type
-
flags
private int flags
-
-
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:
equalsin classAbstractEdge<Edge, BasicBlock>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractEdge<Edge, BasicBlock>
-
compareTo
Compare with other edge.- Specified by:
compareToin interfaceComparable<Edge>- Overrides:
compareToin classAbstractEdge<Edge, BasicBlock>
-
toString
-
isBackwardInBytecode
public boolean isBackwardInBytecode() -
sourceIsTopOfLoop
-
formatAsString
Return a string representation of the edge. -
edgeTypeToString
-
stringToEdgeType
-