Package org.jtool.cfg
Class CFGReceiver
java.lang.Object
org.jtool.graph.GraphElement
org.jtool.graph.GraphNode
org.jtool.cfg.CFGNode
org.jtool.cfg.CFGStatement
org.jtool.cfg.CFGReceiver
A node for a receiver on a method call or a field access.
-
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
ConstructorsConstructorDescriptionCFGReceiver
(org.eclipse.jdt.core.dom.ASTNode node, CFGNode.Kind kind) Creates a new object that represents a receiver on a method call. -
Method Summary
Modifier and TypeMethodDescriptioncastType()
Returns the type of the receiver.Returns the explicit type of of the receiver.Returns a method call node having this receiver.getName()
Returns the name of an instance specified by this receiver node.void
setMethodCall
(CFGMethodCall methodCall) Sets a method call node having this receiver.void
Sets the name of an instance specified by this receiver node.Returns the type of the receiver.Returns the type of the receiver.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
-
CFGReceiver
Creates a new object that represents a receiver on a method call. This method is not intended to be invoked by clients.- Parameters:
node
- the AST node correspond to this nodekind
- the kind of this node
-
-
Method Details
-
setName
Sets the name of an instance specified by this receiver node. This method is not intended to be invoked by clients.- Parameters:
name
- the instance name to be set
-
getName
Returns the name of an instance specified by this receiver node.- Returns:
- the instance name of this receiver
-
setMethodCall
Sets a method call node having this receiver.- Parameters:
methodCall
- the method call node
-
getMethodCall
Returns a method call node having this receiver.- Returns:
- the the method call node
-
explicitType
Returns the explicit type of of the receiver.- Returns:
- the receiver type, or
null
if the receiver does not have an explicit type
-
stringLiteral
Returns the type of the receiver.- Returns:
- the receiver type (
java.lang.String
), ornull
if the receiver is not a string literal
-
typeLiteral
Returns the type of the receiver.- Returns:
- the receiver type (
java.lang.Class
), ornull
if the receiver is not a type literal
-
castType
Returns the type of the receiver.- Returns:
- the cast receiver type, or
null
if the receiver is not cast
-