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<Node>
- Direct Known Subclasses:
ASMDeclarationStatement
public class DeclarationStatement extends Statement
AStatement, which contains a single or multipleDeclarations. Usually these statements occur if one defines a variable within a function body. A function body is aCompoundStatement, which can only contain other statements, but not declarations. Therefore declarations are wrapped in aDeclarationStatement.
-
-
Constructor Summary
Constructors Constructor Description DeclarationStatement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToPropertyEdgeDeclaration(@NonNull Declaration declaration)booleanequals(java.lang.Object o)@NonNull java.util.List<Declaration>getDeclarations()java.util.List<PropertyEdge<Declaration>>getDeclarationsPropertyEdge()DeclarationgetSingleDeclaration()<T extends Declaration>
TgetSingleDeclarationAs(java.lang.Class<T> clazz)inthashCode()booleanisSingleDeclaration()voidsetDeclarations(java.util.List<Declaration> declarations)voidsetSingleDeclaration(Declaration declaration)java.lang.StringtoString()-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.statements.Statement
addDeclaration, getLocals, getLocalsPropertyEdge, removeLocal, setLocals
-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.Node
addAnnotations, addNextCFG, addNextCFG, addNextDFG, addNextEOG, addPrevDFG, addPrevEOG, addTypedef, clearNextEOG, disconnectFromGraph, getAnnotations, getArgumentIndex, getCode, getFile, getId, getLocation, getName, getNextCFG, getNextDFG, getNextEOG, getNextEOGProperties, getNextEOGPropertyEdge, getPrevDFG, getPrevEOG, getPrevEOGProperties, getTypedefs, isDummy, isImplicit, removeNextDFG, removePrevDFG, removePrevEOGEntries, removePrevEOGEntry, setArgumentIndex, setCode, setComment, setDummy, setFile, setImplicit, setLocation, setName, setNextDFG, setNextEOG, setPrevDFG, setPrevEOG, setPrevEOGProperties, setTypedefs
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.fraunhofer.aisec.cpg.graph.DeclarationHolder
addIfNotContains, addIfNotContains, addIfNotContains
-
Methods inherited from interface de.fraunhofer.aisec.cpg.processing.IVisitable
accept
-
-
-
-
Method Detail
-
getSingleDeclaration
public Declaration getSingleDeclaration()
-
isSingleDeclaration
public boolean isSingleDeclaration()
-
setSingleDeclaration
public void setSingleDeclaration(Declaration declaration)
-
getSingleDeclarationAs
public <T extends Declaration> T getSingleDeclarationAs(java.lang.Class<T> clazz)
-
getDeclarations
public @NonNull java.util.List<Declaration> getDeclarations()
-
getDeclarationsPropertyEdge
public java.util.List<PropertyEdge<Declaration>> getDeclarationsPropertyEdge()
-
setDeclarations
public void setDeclarations(java.util.List<Declaration> declarations)
-
addToPropertyEdgeDeclaration
public void addToPropertyEdgeDeclaration(@NonNull Declaration declaration)
-
-