edu.umd.cs.findbugs.ba

Class Edge

public class Edge extends AbstractEdge<Edge,BasicBlock> implements EdgeTypes, Debug

An edge of a control flow graph.

Author: David Hovemeyer

See Also: BasicBlock CFG

Constructor Summary
Edge(BasicBlock source, BasicBlock dest)
Constructor.
Method Summary
static StringedgeTypeToString(int edgeType)
Get string representing given edge type.
StringformatAsString(boolean reverse)
Return a string representation of the edge.
intgetFlags()
Get the edge flags.
intgetId()
intgetType()
Get the type of edge.
booleanisBackwardInBytecode()
booleanisExceptionEdge()
Is 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 intstringToEdgeType(String s)
Get numeric edge type from string representation.

Constructor Detail

Edge

public Edge(BasicBlock source, BasicBlock dest)
Constructor.

Parameters: source source basic block dest destination basic block

Method Detail

edgeTypeToString

public static String edgeTypeToString(int edgeType)
Get string representing given edge type.

formatAsString

public String formatAsString(boolean reverse)
Return a string representation of the edge.

getFlags

public int getFlags()
Get the edge flags.

getId

public int getId()

getType

public int getType()
Get the type of edge.

isBackwardInBytecode

public boolean isBackwardInBytecode()

isExceptionEdge

public boolean isExceptionEdge()
Is the edge an exception edge?

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

setFlags

public void setFlags(int flags)
Set the edge flags.

setType

public void setType(int type)
Set the type of edge.

sourceIsTopOfLoop

public boolean sourceIsTopOfLoop(Set<Integer> positions)

stringToEdgeType

public static int stringToEdgeType(String s)
Get numeric edge type from string representation.
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.