Class DeclarationStatement
java.lang.Object
de.fraunhofer.aisec.cpg.graph.Node
de.fraunhofer.aisec.cpg.graph.statements.Statement
de.fraunhofer.aisec.cpg.graph.statements.DeclarationStatement
- All Implemented Interfaces:
DeclarationHolder,Persistable,IVisitable<de.fraunhofer.aisec.cpg.graph.Node>
- Direct Known Subclasses:
ASMDeclarationStatement
public class DeclarationStatement extends Statement
A
Statement, which contains a single or multiple Declarations. Usually these
statements occur if one defines a variable within a function body. A function body is a CompoundStatement, which can only contain other statements, but not declarations. Therefore
declarations are wrapped in a DeclarationStatement.-
Nested Class Summary
Nested classes/interfaces inherited from class de.fraunhofer.aisec.cpg.graph.Node
de.fraunhofer.aisec.cpg.graph.Node.Companion -
Field Summary
Fields inherited from class de.fraunhofer.aisec.cpg.graph.Node
Companion, EMPTY_NAME, TO_STRING_STYLE -
Constructor Summary
Constructors Constructor Description DeclarationStatement() -
Method Summary
Modifier and Type Method Description voidaddToPropertyEdgeDeclaration(@NonNull Declaration declaration)booleanequals(java.lang.Object o)@NonNull java.util.List<Declaration>getDeclarations()java.util.List<de.fraunhofer.aisec.cpg.graph.edge.PropertyEdge<Declaration>>getDeclarationsPropertyEdge()DeclarationgetSingleDeclaration()<T extends Declaration>
TgetSingleDeclarationAs(java.lang.Class<T> clazz)inthashCode()booleanisSingleDeclaration()voidsetDeclarations(java.util.List<Declaration> declarations)voidsetSingleDeclaration(Declaration declaration)@NonNull java.lang.StringtoString()Methods inherited from class de.fraunhofer.aisec.cpg.graph.statements.Statement
addDeclaration, getLocals, getLocalsPropertyEdge, removeLocal, setLocalsMethods inherited from class de.fraunhofer.aisec.cpg.graph.Node
addAnnotations, addNextDFG, addNextEOG, addPrevDFG, addPrevEOG, addTypedef, clearNextEOG, disconnectFromGraph, getAnnotations, getArgumentIndex, getCode, getComment, getFile, getId, getLocation, getName, getNextDFG, getNextEOG, getNextEOGEdges, getPrevDFG, getPrevEOG, getPrevEOGEdges, getTypedefs, isImplicit, isInferred, removeNextDFG, removePrevDFG, removePrevEOGEntry, setAnnotations, setArgumentIndex, setCode, setComment, setFile, setId, setImplicit, setInferred, setLocation, setName, setNextDFG, setNextEOG, setNextEOGEdges, setPrevDFG, setPrevEOG, setPrevEOGEdges, setTypedefsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface de.fraunhofer.aisec.cpg.graph.DeclarationHolder
addIfNotContains, addIfNotContains, addIfNotContainsMethods inherited from interface de.fraunhofer.aisec.cpg.processing.IVisitable
accept
-
Constructor Details
-
DeclarationStatement
public DeclarationStatement()
-
-
Method Details
-
getSingleDeclaration
-
isSingleDeclaration
public boolean isSingleDeclaration() -
setSingleDeclaration
-
getSingleDeclarationAs
-
getDeclarations
- Specified by:
getDeclarationsin interfaceDeclarationHolder- Overrides:
getDeclarationsin classStatement
-
getDeclarationsPropertyEdge
public java.util.List<de.fraunhofer.aisec.cpg.graph.edge.PropertyEdge<Declaration>> getDeclarationsPropertyEdge() -
setDeclarations
-
addToPropertyEdgeDeclaration
-
toString
@NotNull public @NonNull java.lang.String toString()- Overrides:
toStringin classde.fraunhofer.aisec.cpg.graph.Node
-
equals
public boolean equals(java.lang.Object o) -
hashCode
public int hashCode()
-