Package de.fraunhofer.aisec.cpg.graph
Class ValueDeclaration
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.graph.Node
-
- de.fraunhofer.aisec.cpg.graph.Declaration
-
- de.fraunhofer.aisec.cpg.graph.ValueDeclaration
-
- All Implemented Interfaces:
HasType
- Direct Known Subclasses:
EnumConstantDeclaration,FieldDeclaration,FunctionDeclaration,ParamVariableDeclaration,VariableDeclaration
public abstract class ValueDeclaration extends Declaration implements HasType
A declaration who has a type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.fraunhofer.aisec.cpg.graph.HasType
HasType.TypeListener
-
-
Constructor Summary
Constructors Constructor Description ValueDeclaration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Set<Type>getPossibleSubTypes()TypegetType()java.util.Set<HasType.TypeListener>getTypeListeners()inthashCode()voidrefreshType()voidregisterTypeListener(HasType.TypeListener listener)voidresetTypes(Type type)Used to set the type and clear the possible subtypes list for when a type is more precise than the current.voidsetPossibleSubTypes(java.util.Set<Type> possibleSubTypes)voidsetType(Type type)java.lang.StringtoString()voidunregisterTypeListener(HasType.TypeListener listener)-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.Node
addNextDFG, addPrevDFG, getArgumentIndex, getCode, getFile, getId, getName, getNextCFG, getNextDFG, getNextEOG, getPrevDFG, getPrevEOG, getRegion, isDummy, removeNextDFG, removePrevDFG, setArgumentIndex, setCode, setComment, setDummy, setFile, 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
shouldBeNotified
-
-
-
-
Method Detail
-
resetTypes
public void resetTypes(Type type)
Description copied from interface:HasTypeUsed to set the type and clear the possible subtypes list for when a type is more precise than the current.- Specified by:
resetTypesin interfaceHasType
-
registerTypeListener
public void registerTypeListener(HasType.TypeListener listener)
- Specified by:
registerTypeListenerin interfaceHasType
-
unregisterTypeListener
public void unregisterTypeListener(HasType.TypeListener listener)
- Specified by:
unregisterTypeListenerin interfaceHasType
-
getTypeListeners
public java.util.Set<HasType.TypeListener> getTypeListeners()
- Specified by:
getTypeListenersin interfaceHasType
-
getPossibleSubTypes
public java.util.Set<Type> getPossibleSubTypes()
- Specified by:
getPossibleSubTypesin interfaceHasType
-
setPossibleSubTypes
public void setPossibleSubTypes(java.util.Set<Type> possibleSubTypes)
- Specified by:
setPossibleSubTypesin interfaceHasType
-
refreshType
public void refreshType()
- Specified by:
refreshTypein interfaceHasType
-
toString
public java.lang.String toString()
- Overrides:
toStringin classDeclaration
-
-