Class SwitchStatement
java.lang.Object
de.fraunhofer.aisec.cpg.graph.Node
de.fraunhofer.aisec.cpg.graph.statements.Statement
de.fraunhofer.aisec.cpg.graph.statements.SwitchStatement
- All Implemented Interfaces:
DeclarationHolder,Persistable,IVisitable<de.fraunhofer.aisec.cpg.graph.Node>
public class SwitchStatement extends Statement
Represents a Java or C++ switch statement of the
switch (selector) {...} that can
include case and default statements. Break statements break out of the switch and labeled breaks
in JAva are handled properly.-
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 ExpressionselectorSelector that determines the case/default statement of the subsequent executionFields inherited from class de.fraunhofer.aisec.cpg.graph.Node
Companion, EMPTY_NAME, TO_STRING_STYLE -
Constructor Summary
Constructors Constructor Description SwitchStatement() -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)StatementgetInitializerStatement()ExpressiongetSelector()DeclarationgetSelectorDeclaration()StatementgetStatement()inthashCode()voidsetInitializerStatement(Statement initializerStatement)voidsetSelector(Expression selector)voidsetSelectorDeclaration(Declaration selectorDeclaration)voidsetStatement(Statement statement)Methods inherited from class de.fraunhofer.aisec.cpg.graph.statements.Statement
addDeclaration, getDeclarations, getLocals, getLocalsPropertyEdge, removeLocal, setLocalsMethods 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, toStringMethods 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
-
Field Details
-
selector
Selector that determines the case/default statement of the subsequent execution
-
-
Constructor Details
-
SwitchStatement
public SwitchStatement()
-
-
Method Details
-
getInitializerStatement
-
setInitializerStatement
-
getSelectorDeclaration
-
setSelectorDeclaration
-
getSelector
-
setSelector
-
getStatement
-
setStatement
-
equals
public boolean equals(java.lang.Object o) -
hashCode
public int hashCode()
-