Class CallGraphNode
- java.lang.Object
-
- it.unive.lisa.interprocedural.callgraph.CallGraphNode
-
- All Implemented Interfaces:
Node<CallGraphNode,CallGraphEdge,BaseCallGraph>
public class CallGraphNode extends java.lang.Object implements Node<CallGraphNode,CallGraphEdge,BaseCallGraph>
A node of aBaseCallGraph, representing a singleCodeMember.
-
-
Constructor Summary
Constructors Constructor Description CallGraphNode(BaseCallGraph graph, CodeMember cm)Builds the node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> booleanaccept(GraphVisitor<BaseCallGraph,CallGraphNode,CallGraphEdge,V> visitor, V tool)Accepts the givenGraphVisitor.booleanequals(java.lang.Object obj)CodeMembergetCodeMember()Yields theCodeMemberrepresented by this node.BaseCallGraphgetGraph()Yields the parentBaseCallGraphcontaining this node.inthashCode()intsetOffset(int offset)Sets the offset of this node to the given value, and then proceeds by setting the one of its nested nodes (if any) to subsequent values.java.lang.StringtoString()
-
-
-
Constructor Detail
-
CallGraphNode
public CallGraphNode(BaseCallGraph graph, CodeMember cm)
Builds the node.- Parameters:
graph- the parent graphcm- the code member represented by this node
-
-
Method Detail
-
getCodeMember
public CodeMember getCodeMember()
Yields theCodeMemberrepresented by this node.- Returns:
- the code member
-
getGraph
public BaseCallGraph getGraph()
Yields the parentBaseCallGraphcontaining this node.- Returns:
- the parent graph
-
setOffset
public int setOffset(int offset)
Description copied from interface:NodeSets the offset of this node to the given value, and then proceeds by setting the one of its nested nodes (if any) to subsequent values. The last offset used is returned.- Specified by:
setOffsetin interfaceNode<CallGraphNode,CallGraphEdge,BaseCallGraph>- Parameters:
offset- the offset to set- Returns:
- the last offset used while setting the offsets of nested nodes
-
accept
public <V> boolean accept(GraphVisitor<BaseCallGraph,CallGraphNode,CallGraphEdge,V> visitor, V tool)
Description copied from interface:NodeAccepts the givenGraphVisitor. Implementors of this method are responsible for invokingGraphVisitor.visit(Object, Graph, Node)on this node afterNode.accept(GraphVisitor, Object)has been invoked on all nested nodes, if any. The visiting should stop at the first of such calls that returnfalse.- Specified by:
acceptin interfaceNode<CallGraphNode,CallGraphEdge,BaseCallGraph>- Type Parameters:
V- the type of auxiliary tool thatvisitorcan use- Parameters:
visitor- the visitor that is visiting theGraphcontaining this nodetool- the auxiliary tool thatvisitorcan use- Returns:
- whether or not the visiting should stop when this call returns, as decided by the visitor itself
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-