Package net.sourceforge.pmd.lang.dfa
Class AbstractDataFlowNode
- java.lang.Object
-
- net.sourceforge.pmd.lang.dfa.AbstractDataFlowNode
-
- All Implemented Interfaces:
DataFlowNode
- Direct Known Subclasses:
StartOrEndDataFlowNode
public abstract class AbstractDataFlowNode extends Object implements DataFlowNode
Each data flow contains a set of DataFlowNodes.- Author:
- raik
-
-
Field Summary
Fields Modifier and Type Field Description protected List<DataFlowNode>
children
protected List<DataFlowNode>
dataFlow
protected int
line
protected Node
node
protected List<DataFlowNode>
parents
protected Set<NodeType>
type
protected List<VariableAccess>
variableAccess
-
Constructor Summary
Constructors Constructor Description AbstractDataFlowNode(List<DataFlowNode> dataFlow)
AbstractDataFlowNode(List<DataFlowNode> dataFlow, Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPathToChild(DataFlowNode child)
List<DataFlowNode>
getChildren()
List<DataFlowNode>
getFlow()
int
getIndex()
int
getLine()
Node
getNode()
List<DataFlowNode>
getParents()
List<VariableAccess>
getVariableAccess()
boolean
isType(NodeType type)
boolean
removePathToChild(DataFlowNode child)
void
reverseParentPathsTo(DataFlowNode destination)
void
setType(NodeType type)
void
setVariableAccess(List<VariableAccess> variableAccess)
String
toString()
-
-
-
Field Detail
-
node
protected Node node
-
parents
protected List<DataFlowNode> parents
-
children
protected List<DataFlowNode> children
-
variableAccess
protected List<VariableAccess> variableAccess
-
dataFlow
protected List<DataFlowNode> dataFlow
-
line
protected int line
-
-
Constructor Detail
-
AbstractDataFlowNode
public AbstractDataFlowNode(List<DataFlowNode> dataFlow)
-
AbstractDataFlowNode
public AbstractDataFlowNode(List<DataFlowNode> dataFlow, Node node)
-
-
Method Detail
-
addPathToChild
public void addPathToChild(DataFlowNode child)
- Specified by:
addPathToChild
in interfaceDataFlowNode
-
removePathToChild
public boolean removePathToChild(DataFlowNode child)
- Specified by:
removePathToChild
in interfaceDataFlowNode
-
reverseParentPathsTo
public void reverseParentPathsTo(DataFlowNode destination)
- Specified by:
reverseParentPathsTo
in interfaceDataFlowNode
-
getLine
public int getLine()
- Specified by:
getLine
in interfaceDataFlowNode
-
setType
public void setType(NodeType type)
- Specified by:
setType
in interfaceDataFlowNode
-
isType
public boolean isType(NodeType type)
- Specified by:
isType
in interfaceDataFlowNode
-
getNode
public Node getNode()
- Specified by:
getNode
in interfaceDataFlowNode
-
getChildren
public List<DataFlowNode> getChildren()
- Specified by:
getChildren
in interfaceDataFlowNode
-
getParents
public List<DataFlowNode> getParents()
- Specified by:
getParents
in interfaceDataFlowNode
-
getFlow
public List<DataFlowNode> getFlow()
- Specified by:
getFlow
in interfaceDataFlowNode
-
getIndex
public int getIndex()
- Specified by:
getIndex
in interfaceDataFlowNode
-
setVariableAccess
public void setVariableAccess(List<VariableAccess> variableAccess)
- Specified by:
setVariableAccess
in interfaceDataFlowNode
-
getVariableAccess
public List<VariableAccess> getVariableAccess()
- Specified by:
getVariableAccess
in interfaceDataFlowNode
-
-