Class UnknownType

  • All Implemented Interfaces:
    Persistable, IVisitable<Node>

    public class UnknownType
    extends Type
    UnknownType describe the case in which it is not possible for the CPG to determine which Type is used. E.g.: This occurs when the type is inferred by the compiler automatically when using keywords such as auto in cpp
    • Method Detail

      • getUnknownType

        public static UnknownType getUnknownType()
        Use this function to obtain an UnknownType or call the TypeParser with the typeString UNKNOWN
        Returns:
        UnknownType instance
      • reference

        public Type reference​(PointerType.PointerOrigin pointerOrigin)
        Specified by:
        reference in class Type
        Parameters:
        pointerOrigin - Reason for the reference (array of pointer)
        Returns:
        Same UnknownType, as it is makes no sense to obtain a pointer/reference to an UnknownType
      • dereference

        public Type dereference()
        Specified by:
        dereference in class Type
        Returns:
        Same UnknownType,
      • duplicate

        public Type duplicate()
        Specified by:
        duplicate in class Type
        Returns:
        Creates an exact copy of the current type (chain)
      • hashCode

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

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

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