Class IncompleteType

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

    • IncompleteType

      public IncompleteType()
    • IncompleteType

      public IncompleteType​(Type type)
  • Method Details

    • 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