Package de.fraunhofer.aisec.cpg.graph
Class VariableDeclaration
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.graph.Node
-
- de.fraunhofer.aisec.cpg.graph.Declaration
-
- de.fraunhofer.aisec.cpg.graph.ValueDeclaration
-
- de.fraunhofer.aisec.cpg.graph.VariableDeclaration
-
- All Implemented Interfaces:
HasType,HasType.TypeListener
public class VariableDeclaration extends ValueDeclaration implements HasType.TypeListener
Represents the declaration of a variable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.fraunhofer.aisec.cpg.graph.HasType
HasType.TypeListener
-
-
Field Summary
Fields Modifier and Type Field Description protected @Nullable ExpressioninitializerThe (optional) initializer of the declaration.-
Fields inherited from class de.fraunhofer.aisec.cpg.graph.ValueDeclaration
possibleSubTypes, type
-
-
Constructor Summary
Constructors Constructor Description VariableDeclaration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)@Nullable ExpressiongetInitializer()<T> @Nullable TgetInitializerAs(java.lang.Class<T> clazz)inthashCode()voidpossibleSubTypesChanged(HasType src, HasType root, java.util.Set<Type> oldSubTypes)voidsetInitializer(@Nullable Expression initializer)java.lang.StringtoString()voidtypeChanged(HasType src, HasType root, Type oldType)-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.ValueDeclaration
getPossibleSubTypes, getType, getTypeListeners, refreshType, registerTypeListener, resetTypes, setPossibleSubTypes, setType, unregisterTypeListener
-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.Node
addNextDFG, addPrevDFG, disconnectFromGraph, getArgumentIndex, getCode, getFile, getId, getName, getNextCFG, getNextDFG, getNextEOG, getPrevDFG, getPrevEOG, getRegion, isDummy, isImplicit, removeNextDFG, removePrevDFG, setArgumentIndex, setCode, setComment, setDummy, setFile, setImplicit, setName, setNextDFG, setNextEOG, setPrevDFG, setPrevEOG, setRegion
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.fraunhofer.aisec.cpg.graph.HasType
setPossibleSubTypes, setType
-
-
-
-
Field Detail
-
initializer
protected @Nullable Expression initializer
The (optional) initializer of the declaration.
-
-
Method Detail
-
getInitializer
public @Nullable Expression getInitializer()
-
getInitializerAs
public <T> @Nullable T getInitializerAs(java.lang.Class<T> clazz)
-
setInitializer
public void setInitializer(@Nullable Expression initializer)
-
typeChanged
public void typeChanged(HasType src, HasType root, Type oldType)
- Specified by:
typeChangedin interfaceHasType.TypeListener
-
possibleSubTypesChanged
public void possibleSubTypesChanged(HasType src, HasType root, java.util.Set<Type> oldSubTypes)
- Specified by:
possibleSubTypesChangedin interfaceHasType.TypeListener
-
toString
public java.lang.String toString()
- Overrides:
toStringin classValueDeclaration
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classValueDeclaration
-
hashCode
public int hashCode()
- Overrides:
hashCodein classValueDeclaration
-
-