Package org.jtool.cfg
Class CFGParameter
java.lang.Object
org.jtool.graph.GraphElement
org.jtool.graph.GraphNode
org.jtool.cfg.CFGNode
org.jtool.cfg.CFGStatement
org.jtool.cfg.CFGParameter
A node for a parameter of a method declaration or an argument of a method call.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jtool.cfg.CFGNode
CFGNode.Kind
-
Field Summary
Fields inherited from class org.jtool.cfg.CFGStatement
defs, uses
Fields inherited from class org.jtool.graph.GraphNode
id, incomingEdges, outgoingEdges
-
Constructor Summary
ConstructorsConstructorDescriptionCFGParameter
(org.eclipse.jdt.core.dom.ASTNode node, CFGNode.Kind kind, int index) Creates a new object that represents a parameter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the variable defined when a method is called.int
getIndex()
Returns the index number of the parameter list or the argument lists.Returns the parent node that this node directly dangles on.Returns the variable used when a method is called.void
setIndex
(int index) Sets the index number of the parameter list or the argument lists.void
The parent node that this node directly dangles on.Methods inherited from class org.jtool.cfg.CFGStatement
addDefVariable, addDefVariables, addUseVariable, addUseVariables, clearDefVariables, clearUseVariables, defineVariable, findPrimaryUseVariables, findPrimaryUseVariables, getDefFirst, getDefLast, getDefVariable, getDefVariables, getUseFirst, getUseLast, getUseVariable, getUseVariables, hasDefVariable, hasUseVariable, removeDefVariable, removeUseVariable, setDefVariable, setDefVariables, setUseVariable, setUseVariables, toString, toStringForVariables, useVariable
Methods inherited from class org.jtool.cfg.CFGNode
equals, equals, getASTNode, getIncomingFalseFlows, getIncomingFlows, getIncomingTrueFlows, getKind, getNumOfPredecessors, getNumOfSuccessors, getOutgoingFalseFlow, getOutgoingFlows, getOutgoingTrueFlow, getPDGNode, getPredecessors, getSuccessors, hashCode, isActual, isActualIn, isActualOut, isAssert, isAssignment, isBranch, isBreak, isCatchClause, isClassEntry, isConstructorEntry, isContinue, isDo, isDummy, isEnhancedFor, isEntry, isEnumConstantEntry, isEnumEntry, isExit, isExpression, isFieldDeclaration, isFieldEntry, isFinallyClause, isFor, isFormal, isFormalIn, isFormalOut, isIf, isInitializerEntry, isInterfaceEntry, isJoin, isLabel, isLiteral, isLocalDeclaration, isLoop, isMerge, isMethodCall, isMethodEntry, isNextToBranch, isParameter, isReceiver, isReturn, isSelection, isStatement, isStatement, isStatementNotParameter, isSwitch, isSwitchCase, isSwitchDefault, isSynchronized, isThrow, isThrowClause, isTry, isWhile, print, resetId, setASTNode, setKind, setPDGNode, sortNodes, sortNodesInverse
Methods inherited from class org.jtool.graph.GraphNode
addIncomingEdge, addIncomingEdges, addOutgoingEdge, addOutgoingEdges, clear, equals, equals, getDstNodes, getId, getIncomingEdges, getOutgoingEdges, getSrcNodes, removeIncomingEdge, removeOutgoingEdge, setId, sortGraphNode
Methods inherited from class org.jtool.graph.GraphElement
difference, equals, getIdString, intersection, subset, subsetEqual, union
-
Constructor Details
-
CFGParameter
Creates a new object that represents a parameter. This method is not intended to be invoked by clients.- Parameters:
node
- the AST node correspond to this nodekind
- the kind of this nodeindex
- the index number of the parameter list or the argument lists.
-
-
Method Details
-
setIndex
public void setIndex(int index) Sets the index number of the parameter list or the argument lists. This method is not intended to be invoked by clients.- Parameters:
index
- the index number to be set
-
getIndex
public int getIndex()Returns the index number of the parameter list or the argument lists.- Returns:
- the index number
-
setParent
The parent node that this node directly dangles on. This method is not intended to be invoked by clients.- Parameters:
node
- the parent node to be set
-
getParent
Returns the parent node that this node directly dangles on.- Returns:
- the parent node
-
getDefVariable
Returns the variable defined when a method is called.- Returns:
- the defined variable, or
null
if there is no defined variable
-
getUseVariable
Returns the variable used when a method is called.- Returns:
- the used variable, or
null
if there is no used variable
-