Class ObjectType

  • All Implemented Interfaces:
    Persistable, IVisitable<Node>

    public class ObjectType
    extends Type
    This is the main type in the Type system. ObjectTypes describe objects, as instances of a class. This also includes primitive data types.
    • Method Detail

      • getGenerics

        public java.util.List<Type> getGenerics()
      • getGenericPropertyEdges

        public java.util.List<PropertyEdge<Type>> getGenericPropertyEdges()
      • setRecordDeclaration

        public void setRecordDeclaration​(RecordDeclaration recordDeclaration)
      • reference

        public PointerType reference​(PointerType.PointerOrigin pointerOrigin)
        Specified by:
        reference in class Type
        Parameters:
        pointerOrigin - Reason for the reference (array of pointer)
        Returns:
        PointerType to a ObjectType, e.g. int*
      • dereference

        public Type dereference()
        Specified by:
        dereference in class Type
        Returns:
        UnknownType, as we cannot infer any type information when dereferencing an ObjectType, as it is just some memory and its interpretation is unknown
      • duplicate

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

        public void setGenerics​(java.util.List<Type> generics)
      • addGeneric

        public void addGeneric​(Type generic)
      • 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