Class FunctionPointerType
- java.lang.Object
-
- de.fraunhofer.aisec.cpg.graph.Node
-
- de.fraunhofer.aisec.cpg.graph.types.Type
-
- de.fraunhofer.aisec.cpg.graph.types.FunctionPointerType
-
- All Implemented Interfaces:
Persistable,IVisitable<Node>
public class FunctionPointerType extends Type
FunctionPointerType represents FunctionPointers in CPP containing a list of parameters and a return type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.fraunhofer.aisec.cpg.graph.types.Type
Type.Origin, Type.Qualifier, Type.Storage
-
-
Field Summary
-
Fields inherited from class de.fraunhofer.aisec.cpg.graph.types.Type
origin, primitive, qualifier, storage, superTypes, UNKNOWN_TYPE_STRING
-
-
Constructor Summary
Constructors Constructor Description FunctionPointerType(Type.Qualifier qualifier, Type.Storage storage, java.util.List<Type> parameters, Type returnType)FunctionPointerType(Type type, java.util.List<Type> parameters, Type returnType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Typedereference()Typeduplicate()booleanequals(java.lang.Object o)java.util.List<Type>getParameters()java.util.List<PropertyEdge<Type>>getParametersPropertyEdge()TypegetReturnType()inthashCode()booleanisSimilar(Type t)Required for possibleSubTypes to check if the new Type should be considered a subtype or notPointerTypereference(PointerType.PointerOrigin pointerOrigin)voidsetParameters(java.util.List<Type> parameters)voidsetReturnType(Type returnType)java.lang.StringtoString()-
Methods inherited from class de.fraunhofer.aisec.cpg.graph.types.Type
getQualifier, getReferenceDepth, getRoot, getStorage, getSuperTypes, getTypeName, getTypeOrigin, isFirstOrderType, isPrimitive, refreshNames, setAdditionalTypeKeywords, setQualifier, setRoot, setStorage, setTypeOrigin
-
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.processing.IVisitable
accept
-
-
-
-
Constructor Detail
-
FunctionPointerType
public FunctionPointerType(Type.Qualifier qualifier, Type.Storage storage, java.util.List<Type> parameters, Type returnType)
-
-
Method Detail
-
setParameters
public void setParameters(java.util.List<Type> parameters)
-
setReturnType
public void setReturnType(Type returnType)
-
getParametersPropertyEdge
public java.util.List<PropertyEdge<Type>> getParametersPropertyEdge()
-
getParameters
public java.util.List<Type> getParameters()
-
getReturnType
public Type getReturnType()
-
reference
public PointerType reference(PointerType.PointerOrigin pointerOrigin)
-
dereference
public Type dereference()
- Specified by:
dereferencein classType- Returns:
- Dereferences the current Type by resolving the reference. E.g. when dereferencing an pointer type we obtain the type the pointer is pointing towards
-
duplicate
public Type duplicate()
-
isSimilar
public boolean isSimilar(Type t)
Description copied from class:TypeRequired for possibleSubTypes to check if the new Type should be considered a subtype or not
-
-