Package de.fraunhofer.aisec.cpg.graph
Class FieldDeclaration
- 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.FieldDeclaration
-
- All Implemented Interfaces:
HasType,HasType.TypeListener
public class FieldDeclaration extends ValueDeclaration implements HasType.TypeListener
Declaration of a field within aRecordDeclaration. It contains the modifiers associated with the field as well as an initializerExpressionwhich provides an initial value for the field.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.fraunhofer.aisec.cpg.graph.HasType
HasType.TypeListener
-
-
Field Summary
-
Fields inherited from class de.fraunhofer.aisec.cpg.graph.ValueDeclaration
possibleSubTypes, type
-
-
Constructor Summary
Constructors Constructor Description FieldDeclaration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static FieldDeclarationfrom(VariableDeclaration declaration)@Nullable ExpressiongetInitializer()java.util.List<java.lang.String>getModifiers()inthashCode()voidpossibleSubTypesChanged(HasType src, HasType root, java.util.Set<Type> oldSubTypes)voidsetInitializer(Expression initializer)voidsetModifiers(java.util.List<java.lang.String> modifiers)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
-
-
-
-
Method Detail
-
from
public static FieldDeclaration from(VariableDeclaration declaration)
-
getInitializer
public @Nullable Expression getInitializer()
-
setInitializer
public void setInitializer(Expression initializer)
-
getModifiers
public java.util.List<java.lang.String> getModifiers()
-
setModifiers
public void setModifiers(java.util.List<java.lang.String> modifiers)
-
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
-
-