Class JvmCfaNode
java.lang.Object
proguard.analysis.cpa.jvm.cfa.nodes.JvmCfaNode
- All Implemented Interfaces:
CfaNode<JvmCfaEdge,MethodSignature>
- Direct Known Subclasses:
JvmCatchCfaNode,JvmUnknownCfaNode
A node representing a code location of a JVM method identified by a
MethodSignature and
an offset.-
Field Summary
Fields inherited from interface proguard.analysis.cpa.interfaces.CfaNode
EXCEPTION_EXIT_NODE_OFFSET, EXIT_NODES_OFFSET, RETURN_EXIT_NODE_OFFSET -
Constructor Summary
ConstructorsConstructorDescriptionJvmCfaNode(List<JvmCfaEdge> leavingEdges, 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. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEnteringEdge(JvmCfaEdge edge) Adds an edge entering the node.voidaddLeavingEdge(JvmCfaEdge edge) Adds an edge leaving the node.getClazz()Returns the class the node belongs to.Returns a list of entering edges.Returns the edges entering the node that do not come from another method.If the node is the location after a method invocation, returns the enteringJvmInstructionCfaEdgefor the method invocation, empty otherwise.Returns all the interprocedural call edges leaving the node with target method the code of which is known.Returns a list of leaving edges.Returns the edges entering the node that come from another method.Returns the edges leaving the node that do not come from another method.If the node is the location before a method invocation, returns the leavingJvmInstructionCfaEdgefor the method invocation, empty otherwise.intReturns the instruction offset.Returns the function signature it belongs to.inthashCode()booleanChecks whether the node is a function entry.booleanChecks whether the node is a function exit.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface proguard.analysis.cpa.interfaces.CfaNode
isExceptionExitNode, isReturnExitNode, isUnknownNode
-
Constructor Details
-
JvmCfaNode
Create a JVM CFA node without edges. Since in most cases we expect to have just one element in the lists of leaving and entering edges the lists are initialized with size 1.- Parameters:
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 to
-
JvmCfaNode
public JvmCfaNode(List<JvmCfaEdge> leavingEdges, List<JvmCfaEdge> enteringEdges, MethodSignature signature, int offset, Clazz clazz) Create JVM CFA node with the specified entering and exiting edges.- Parameters:
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 to
-
-
Method Details
-
getLeavingEdges
Description copied from interface:CfaNodeReturns a list of leaving edges.- Specified by:
getLeavingEdgesin interfaceCfaNode<JvmCfaEdge,MethodSignature>
-
getEnteringEdges
Description copied from interface:CfaNodeReturns a list of entering edges.- Specified by:
getEnteringEdgesin interfaceCfaNode<JvmCfaEdge,MethodSignature>
-
isEntryNode
public boolean isEntryNode()Description copied from interface:CfaNodeChecks whether the node is a function entry.- Specified by:
isEntryNodein interfaceCfaNode<JvmCfaEdge,MethodSignature>
-
isExitNode
public boolean isExitNode()Description copied from interface:CfaNodeChecks whether the node is a function exit.- Specified by:
isExitNodein interfaceCfaNode<JvmCfaEdge,MethodSignature>
-
getSignature
Description copied from interface:CfaNodeReturns the function signature it belongs to.- Specified by:
getSignaturein interfaceCfaNode<JvmCfaEdge,MethodSignature>
-
getOffset
public int getOffset()Description copied from interface:CfaNodeReturns the instruction offset.- Specified by:
getOffsetin interfaceCfaNode<JvmCfaEdge,MethodSignature>
-
hashCode
public int hashCode() -
getClazz
Returns the class the node belongs to. -
addLeavingEdge
Adds an edge leaving the node. -
addEnteringEdge
Adds an edge entering the node. -
getEnteringInvokeEdge
If the node is the location after a method invocation, returns the enteringJvmInstructionCfaEdgefor the method invocation, empty otherwise. -
getLeavingInvokeEdge
If the node is the location before a method invocation, returns the leavingJvmInstructionCfaEdgefor the method invocation, empty otherwise. -
getEnteringIntraproceduralEdges
Returns the edges entering the node that do not come from another method. -
getLeavingIntraproceduralEdges
Returns the edges leaving the node that do not come from another method. -
getLeavingInterproceduralEdges
Returns the edges entering the node that come from another method. -
getKnownMethodCallEdges
Returns all the interprocedural call edges leaving the node with target method the code of which is known. -
toString
-