java.lang.Object
com.github.javaparser.resolution.model.typesystem.NullType
All Implemented Interfaces:
ResolvedType

public class NullType extends Object implements ResolvedType
This is a virtual type used to represent null values.
  • Field Details

    • INSTANCE

      public static final NullType INSTANCE
  • Constructor Details

    • NullType

      private NullType()
  • Method Details

    • isArray

      public boolean isArray()
      Specified by:
      isArray in interface ResolvedType
      Returns:
      true, if this type represent an array - otherwise false.
    • isNull

      public boolean isNull()
      Description copied from interface: ResolvedType
      Is this the null type?
      Specified by:
      isNull in interface ResolvedType
    • isReferenceType

      public boolean isReferenceType()
      Description copied from interface: ResolvedType
      Can this be seen as a ReferenceTypeUsage? In other words: is this a reference to a class, an interface or an enum?
      Specified by:
      isReferenceType in interface ResolvedType
    • describe

      public String describe()
      Specified by:
      describe in interface ResolvedType
    • isTypeVariable

      public boolean isTypeVariable()
      Specified by:
      isTypeVariable in interface ResolvedType
    • isAssignableBy

      public boolean isAssignableBy(ResolvedType other)
      Description copied from interface: ResolvedType
      This method checks if ThisType t = new OtherType() would compile.
      Specified by:
      isAssignableBy in interface ResolvedType