Class UnknownType

java.lang.Object
de.fraunhofer.aisec.cpg.graph.Node
de.fraunhofer.aisec.cpg.graph.types.Type
de.fraunhofer.aisec.cpg.graph.types.UnknownType
All Implemented Interfaces:
Persistable, IVisitable<de.fraunhofer.aisec.cpg.graph.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 Details

    • getUnknownType

      public static @NonNull 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
    • setStorage

      public void setStorage​(@NonNull Type.Storage storage)
      Overrides:
      setStorage in class Type
    • setQualifier

      public void setQualifier​(Type.Qualifier qualifier)
      Overrides:
      setQualifier in class Type
    • setTypeOrigin

      public void setTypeOrigin​(Type.Origin origin)
      Overrides:
      setTypeOrigin in class Type