Class 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.
    • Constructor Detail

      • FunctionPointerType

        public FunctionPointerType​(Type type,
                                   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)
        Specified by:
        reference in class Type
        Parameters:
        pointerOrigin - Reason for the reference (array of pointer)
        Returns:
        Returns a reference to the current Type. E.g. when creating a pointer to an existing ObjectType
      • dereference

        public Type dereference()
        Specified by:
        dereference in class Type
        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()
        Specified by:
        duplicate in class Type
        Returns:
        Creates an exact copy of the current type (chain)
      • isSimilar

        public boolean isSimilar​(Type t)
        Description copied from class: Type
        Required for possibleSubTypes to check if the new Type should be considered a subtype or not
        Overrides:
        isSimilar in class Type
        Parameters:
        t - other type the similarity is checked with
        Returns:
        True if the parameter t is equal to the current type (this)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class Type
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Type
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Type