public class DataFlowNode extends OwnedNode<com.github.javaparser.ast.Node>
DataFlowGraph containing a JavaParser Node. The incoming DataFlowEdges are DataFlowNodes that
influence the state of this node. The outgoing DataFlowEdges point to DataFlowNodes which state is influenced by this DataFlowNode.| Modifier and Type | Class and Description |
|---|---|
static class |
DataFlowNode.Builder
Builder to build
DataFlowNode. |
name| Constructor and Description |
|---|
DataFlowNode(com.github.javaparser.ast.Node representedNode) |
DataFlowNode(String name,
com.github.javaparser.ast.Node representedNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdgeTo(DataFlowNode to) |
static DataFlowNode.Builder |
builder()
Creates builder to build
DataFlowNode. |
boolean |
equals(Object obj) |
List<DataFlowEdge> |
getIn() |
List<DataFlowEdge> |
getOut() |
Optional<OwnedNode<?>> |
getOwner() |
String |
getType() |
boolean |
hasAsDirectInput(DataFlowNode node) |
int |
hashCode() |
boolean |
isField() |
boolean |
isInputParameter() |
void |
setIn(List<DataFlowEdge> in) |
void |
setOut(List<DataFlowEdge> out) |
void |
setOwner(OwnedNode<?> owner) |
void |
setType(String type) |
String |
toString() |
String |
toStringBackward(int tabs) |
String |
toStringForward(int tabs) |
String |
toStringForward(int tabs,
int firstTabs) |
List<DataFlowNode> |
walkBackUntil(java.util.function.Predicate<DataFlowNode> predicate,
java.util.function.Predicate<DataFlowNode> scope)
Walks back over incoming edges until predicate is met or no incoming edges are present.
|
getName, getRepresentedNode, setName, setRepresentedNodepublic DataFlowNode(com.github.javaparser.ast.Node representedNode)
public DataFlowNode(String name, com.github.javaparser.ast.Node representedNode)
public List<DataFlowEdge> getIn()
public void setIn(List<DataFlowEdge> in)
public List<DataFlowEdge> getOut()
public void setOut(List<DataFlowEdge> out)
public void addEdgeTo(DataFlowNode to)
public String getType()
public void setType(String type)
public boolean isField()
public boolean isInputParameter()
public List<DataFlowNode> walkBackUntil(java.util.function.Predicate<DataFlowNode> predicate, java.util.function.Predicate<DataFlowNode> scope)
predicate - The Predicate to meetscope - The scope for the variable, the search is stopped as soon as the scope does not hold and an empty list is returned.List of DataFlowNodeGraphUtil.walkBackUntil(DataFlowNode, Predicate, Predicate)public boolean hasAsDirectInput(DataFlowNode node)
node - The DataFlowNode to check.public int hashCode()
hashCode in class NodeRepresenter<com.github.javaparser.ast.Node>public boolean equals(Object obj)
equals in class NodeRepresenter<com.github.javaparser.ast.Node>public String toString()
toString in class NodeRepresenter<com.github.javaparser.ast.Node>public String toStringForward(int tabs)
public String toStringForward(int tabs, int firstTabs)
public String toStringBackward(int tabs)
public static DataFlowNode.Builder builder()
DataFlowNode.public Optional<OwnedNode<?>> getOwner()
getOwner in class OwnedNode<com.github.javaparser.ast.Node>OwnedNode of this node. The optional will be empty in case of a DataFlowGraph representing a non inner class or
a method for which the rest of the graph was not parsed.public void setOwner(OwnedNode<?> owner)
Copyright © 2019. All rights reserved.