Class Statement

java.lang.Object
de.fraunhofer.aisec.cpg.graph.Node
de.fraunhofer.aisec.cpg.graph.statements.Statement
All Implemented Interfaces:
DeclarationHolder, Persistable, IVisitable<de.fraunhofer.aisec.cpg.graph.Node>
Direct Known Subclasses:
AssertStatement, BreakStatement, CaseStatement, CatchClause, CompoundStatement, ContinueStatement, DeclarationStatement, DefaultStatement, DoStatement, EmptyStatement, Expression, ForEachStatement, ForStatement, GotoStatement, IfStatement, LabelStatement, ReturnStatement, SwitchStatement, SynchronizedStatement, TryStatement, WhileStatement

public abstract class Statement
extends de.fraunhofer.aisec.cpg.graph.Node
implements DeclarationHolder
A statement.
  • 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
    Modifier and Type Field Description
    protected java.util.List<de.fraunhofer.aisec.cpg.graph.edge.PropertyEdge<VariableDeclaration>> locals
    A list of local variables associated to this statement, defined by their VariableDeclaration extracted from Block because for, while, if, switch can declare locals in their condition or initializers

    Fields inherited from class de.fraunhofer.aisec.cpg.graph.Node

    Companion, EMPTY_NAME, TO_STRING_STYLE
  • Constructor Summary

    Constructors
    Constructor Description
    Statement()  
  • Method Summary

    Modifier and Type Method Description
    void addDeclaration​(@NonNull Declaration declaration)
    Adds the specified declaration to this declaration holder.
    boolean equals​(java.lang.Object o)  
    java.util.List<Declaration> getDeclarations()  
    java.util.List<VariableDeclaration> getLocals()  
    java.util.List<de.fraunhofer.aisec.cpg.graph.edge.PropertyEdge<VariableDeclaration>> getLocalsPropertyEdge()  
    int hashCode()  
    void removeLocal​(VariableDeclaration variableDeclaration)  
    void setLocals​(java.util.List<VariableDeclaration> locals)  

    Methods inherited from class de.fraunhofer.aisec.cpg.graph.Node

    addAnnotations, addNextDFG, addNextEOG, addPrevDFG, addPrevEOG, addTypedef, clearNextEOG, disconnectFromGraph, getAnnotations, getArgumentIndex, getAstChildren, 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, setTypedefs, toString

    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
  • Field Details

    • locals

      protected java.util.List<de.fraunhofer.aisec.cpg.graph.edge.PropertyEdge<VariableDeclaration>> locals
      A list of local variables associated to this statement, defined by their VariableDeclaration extracted from Block because for, while, if, switch can declare locals in their condition or initializers
  • Constructor Details

    • Statement

      public Statement()
  • Method Details