Class FieldDeclaration
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.graph.Node
-
- de.fraunhofer.aisec.cpg.graph.declarations.Declaration
-
- de.fraunhofer.aisec.cpg.graph.declarations.ValueDeclaration
-
- de.fraunhofer.aisec.cpg.graph.declarations.FieldDeclaration
-
- All Implemented Interfaces:
HasType,HasType.TypeListener,Persistable,IVisitable<Node>
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.declarations.ValueDeclaration
possibleSubTypes, type
-
-
Constructor Summary
Constructors Constructor Description FieldDeclaration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)FieldDeclarationgetDefinition()@Nullable ExpressiongetInitializer()java.util.List<java.lang.String>getModifiers()inthashCode()booleanisArray()booleanisDefinition()booleanisImplicitInitializerAllowed()voidpossibleSubTypesChanged(HasType src, HasType root, java.util.Set<Type> oldSubTypes)voidsetDefinition(FieldDeclaration definition)voidsetImplicitInitializerAllowed(boolean implicitInitializerAllowed)voidsetInitializer(Expression initializer)voidsetIsArray(boolean isArray)voidsetIsDefinition(boolean definition)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.declarations.ValueDeclaration
getPossibleSubTypes, getPropagationType, getType, getTypeListeners, refreshType, registerTypeListener, resetTypes, setPossibleSubTypes, setType, unregisterTypeListener, updatePossibleSubtypes, updateType
-
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.HasType
setPossibleSubTypes, setType
-
Methods inherited from interface de.fraunhofer.aisec.cpg.processing.IVisitable
accept
-
-
-
-
Method Detail
-
isImplicitInitializerAllowed
public boolean isImplicitInitializerAllowed()
-
setImplicitInitializerAllowed
public void setImplicitInitializerAllowed(boolean implicitInitializerAllowed)
-
isArray
public boolean isArray()
-
setIsArray
public void setIsArray(boolean isArray)
-
getInitializer
public @Nullable Expression getInitializer()
-
setInitializer
public void setInitializer(Expression initializer)
-
getDefinition
public FieldDeclaration getDefinition()
-
isDefinition
public boolean isDefinition()
-
setIsDefinition
public void setIsDefinition(boolean definition)
-
setDefinition
public void setDefinition(FieldDeclaration definition)
-
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
-
-