Class IncompleteType

  • All Implemented Interfaces:
    Persistable, IVisitable<Node>

    public class IncompleteType
    extends Type
    IncompleteTypes are defined as object with unknown size. For instance: void, arrays of unknown length, forward declarated classes in C++

    Right now we are only dealing with void for objects with unknown size, therefore the name is fixed to void. However, this can be changed in future, in order to support other objects with unknown size apart from void. Therefore this Type is not called VoidType

    • Constructor Detail

      • IncompleteType

        public IncompleteType()
      • IncompleteType

        public IncompleteType​(Type type)
    • Method Detail

      • reference

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

        public Type dereference()
        Specified by:
        dereference in class Type
        Returns:
        dereferencing void results in void therefore the same type is returned
      • duplicate

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