public class JvmCfaNode extends java.lang.Object implements CfaNode<JvmCfaEdge,MethodSignature>
MethodSignature
and
an offset.EXCEPTION_EXIT_NODE_OFFSET, RETURN_EXIT_NODE_OFFSET
Constructor and Description |
---|
JvmCfaNode(java.util.List<JvmCfaEdge> leavingEdges,
java.util.List<JvmCfaEdge> enteringEdges,
MethodSignature signature,
int offset,
Clazz clazz)
Create JVM CFA node with the specified entering and exiting edges.
|
JvmCfaNode(MethodSignature signature,
int offset,
Clazz clazz)
Create a JVM CFA node without edges.
|
Modifier and Type | Method and Description |
---|---|
void |
addEnteringEdge(JvmCfaEdge edge)
Adds an edge entering the node.
|
void |
addLeavingEdge(JvmCfaEdge edge)
Adds an edge leaving the node.
|
Clazz |
getClazz()
Returns the class the node belongs to.
|
java.util.List<JvmCfaEdge> |
getEnteringEdges()
Returns a list of entering edges.
|
java.util.Collection<JvmCfaEdge> |
getEnteringIntraproceduralEdges()
Returns the edges entering the node that do not come from another method.
|
java.util.Optional<JvmCfaEdge> |
getEnteringInvokeEdge()
If the node is the location after a method invocation, returns the entering
JvmInstructionCfaEdge for the method invocation, empty otherwise. |
java.util.Collection<JvmCallCfaEdge> |
getKnownMethodCallEdges()
Returns all the interprocedural call edges leaving the node with target method the code of
which is known.
|
java.util.List<JvmCfaEdge> |
getLeavingEdges()
Returns a list of leaving edges.
|
java.util.Collection<JvmCallCfaEdge> |
getLeavingInterproceduralEdges()
Returns the edges entering the node that come from another method.
|
java.util.Collection<JvmCfaEdge> |
getLeavingIntraproceduralEdges()
Returns the edges leaving the node that do not come from another method.
|
java.util.Optional<JvmCfaEdge> |
getLeavingInvokeEdge()
If the node is the location before a method invocation, returns the leaving
JvmInstructionCfaEdge for the method invocation, empty otherwise. |
int |
getOffset()
Returns the instruction offset.
|
MethodSignature |
getSignature()
Returns the function signature it belongs to.
|
int |
hashCode() |
boolean |
isEntryNode()
Checks whether the node is a function entry.
|
boolean |
isExitNode()
Checks whether the node is a function exit.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
isExceptionExitNode, isReturnExitNode, isUnknownNode
public JvmCfaNode(MethodSignature signature, int offset, Clazz clazz)
signature
- the signature of the method the node belongs tooffset
- a number indicating the program location offset of the nodeclazz
- the class of the method the node belongs topublic JvmCfaNode(java.util.List<JvmCfaEdge> leavingEdges, java.util.List<JvmCfaEdge> enteringEdges, MethodSignature signature, int offset, Clazz clazz)
leavingEdges
- a list of edges leaving the nodeenteringEdges
- a list of edges entering the nodesignature
- the signature of the method the node belongs tooffset
- a number indicating the program location offset of the nodeclazz
- the class of the method the node belongs topublic java.util.List<JvmCfaEdge> getLeavingEdges()
CfaNode
getLeavingEdges
in interface CfaNode<JvmCfaEdge,MethodSignature>
public java.util.List<JvmCfaEdge> getEnteringEdges()
CfaNode
getEnteringEdges
in interface CfaNode<JvmCfaEdge,MethodSignature>
public boolean isEntryNode()
CfaNode
isEntryNode
in interface CfaNode<JvmCfaEdge,MethodSignature>
public boolean isExitNode()
CfaNode
isExitNode
in interface CfaNode<JvmCfaEdge,MethodSignature>
public MethodSignature getSignature()
CfaNode
getSignature
in interface CfaNode<JvmCfaEdge,MethodSignature>
public int getOffset()
CfaNode
getOffset
in interface CfaNode<JvmCfaEdge,MethodSignature>
public int hashCode()
hashCode
in class java.lang.Object
public Clazz getClazz()
public void addLeavingEdge(JvmCfaEdge edge)
public void addEnteringEdge(JvmCfaEdge edge)
public java.util.Optional<JvmCfaEdge> getEnteringInvokeEdge()
JvmInstructionCfaEdge
for the method invocation, empty otherwise.public java.util.Optional<JvmCfaEdge> getLeavingInvokeEdge()
JvmInstructionCfaEdge
for the method invocation, empty otherwise.public java.util.Collection<JvmCfaEdge> getEnteringIntraproceduralEdges()
public java.util.Collection<JvmCfaEdge> getLeavingIntraproceduralEdges()
public java.util.Collection<JvmCallCfaEdge> getLeavingInterproceduralEdges()
public java.util.Collection<JvmCallCfaEdge> getKnownMethodCallEdges()
public java.lang.String toString()
toString
in class java.lang.Object