Package de.fraunhofer.aisec.cpg.graph
Class Node
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.graph.Node
-
- Direct Known Subclasses:
Declaration,Statement
public class Node extends java.lang.ObjectThe base class for all graph objects that are going to be persisted in the database.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcodeOriginal code snippet of this node.protected java.lang.StringcommentOptional of this node.protected booleandummyIf a node is marked as being a dummy, it means that it was created artificially and does not necessarily have a real counterpart in the actual source codeprotected java.lang.StringfileName of the containing fileprotected static org.slf4j.Loggerlogprotected java.lang.StringnameA human readable name.protected @NonNull java.util.List<Node>nextCFGoutgoing control flow edges.protected java.util.Set<Node>nextDFGprotected @NonNull java.util.List<Node>nextEOGoutgoing control flow edges.protected java.util.Set<Node>prevDFGprotected java.util.List<Node>prevEOGIncoming control flow edges.protected RegionregionLocation of the finding in source code.static org.apache.commons.lang3.builder.ToStringStyleTO_STRING_STYLE
-
Constructor Summary
Constructors Constructor Description Node()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNextDFG(Node next)voidaddPrevDFG(Node prev)booleanequals(java.lang.Object o)intgetArgumentIndex()@Nullable java.lang.StringgetCode()java.lang.StringgetFile()java.lang.LonggetId()java.lang.StringgetName()@NonNull java.util.List<Node>getNextCFG()java.util.Set<Node>getNextDFG()java.util.List<Node>getNextEOG()java.util.Set<Node>getPrevDFG()java.util.List<Node>getPrevEOG()RegiongetRegion()inthashCode()booleanisDummy()voidremoveNextDFG(Node next)voidremovePrevDFG(Node prev)voidsetArgumentIndex(int argumentIndex)voidsetCode(java.lang.String code)voidsetComment(java.lang.String comment)voidsetDummy(boolean dummy)voidsetFile(java.lang.String file)voidsetName(java.lang.String name)voidsetNextDFG(java.util.Set<Node> nextDFG)voidsetNextEOG(@NonNull java.util.List<Node> nextEOG)voidsetPrevDFG(java.util.Set<Node> prevDFG)voidsetPrevEOG(java.util.List<Node> prevEOG)voidsetRegion(Region region)java.lang.StringtoString()
-
-
-
Field Detail
-
TO_STRING_STYLE
public static final org.apache.commons.lang3.builder.ToStringStyle TO_STRING_STYLE
-
log
protected static final org.slf4j.Logger log
-
name
protected java.lang.String name
A human readable name.
-
code
protected java.lang.String code
Original code snippet of this node.
-
comment
protected java.lang.String comment
Optional of this node.
-
region
protected Region region
Location of the finding in source code.
-
file
protected java.lang.String file
Name of the containing file
-
prevEOG
protected java.util.List<Node> prevEOG
Incoming control flow edges.
-
nextEOG
protected @NonNull java.util.List<Node> nextEOG
outgoing control flow edges.
-
nextCFG
protected @NonNull java.util.List<Node> nextCFG
outgoing control flow edges.
-
prevDFG
protected java.util.Set<Node> prevDFG
-
nextDFG
protected java.util.Set<Node> nextDFG
-
dummy
protected boolean dummy
If a node is marked as being a dummy, it means that it was created artificially and does not necessarily have a real counterpart in the actual source code
-
-
Method Detail
-
getId
public java.lang.Long getId()
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String name)
-
getFile
public java.lang.String getFile()
-
setFile
public void setFile(java.lang.String file)
-
getCode
public @Nullable java.lang.String getCode()
-
setCode
public void setCode(java.lang.String code)
-
getRegion
public Region getRegion()
-
setRegion
public void setRegion(Region region)
-
getPrevEOG
public java.util.List<Node> getPrevEOG()
-
setPrevEOG
public void setPrevEOG(java.util.List<Node> prevEOG)
-
getNextEOG
public java.util.List<Node> getNextEOG()
-
setNextEOG
public void setNextEOG(@NonNull java.util.List<Node> nextEOG)
-
getNextCFG
public @NonNull java.util.List<Node> getNextCFG()
-
getNextDFG
public java.util.Set<Node> getNextDFG()
-
setNextDFG
public void setNextDFG(java.util.Set<Node> nextDFG)
-
addNextDFG
public void addNextDFG(Node next)
-
removeNextDFG
public void removeNextDFG(Node next)
-
getPrevDFG
public java.util.Set<Node> getPrevDFG()
-
setPrevDFG
public void setPrevDFG(java.util.Set<Node> prevDFG)
-
addPrevDFG
public void addPrevDFG(Node prev)
-
removePrevDFG
public void removePrevDFG(Node prev)
-
getArgumentIndex
public int getArgumentIndex()
-
setArgumentIndex
public void setArgumentIndex(int argumentIndex)
-
isDummy
public boolean isDummy()
-
setDummy
public void setDummy(boolean dummy)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setComment
public void setComment(java.lang.String comment)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-