Interface PrimitiveType

  • All Superinterfaces:
    AnnotationTarget, Type

    public interface PrimitiveType
    extends Type
    Primitive types are:
    • boolean
    • byte
    • short
    • int
    • long
    • float
    • double
    • char
    Since:
    4.0
    • Method Detail

      • name

        java.lang.String name()
        Returns the name of this primitive type.
        Returns:
        the name of this primitive type
      • isBoolean

        default boolean isBoolean()
        Returns whether this primitive type is boolean.
        Returns:
        whether this primitive type is boolean
      • isByte

        default boolean isByte()
        Returns whether this primitive type is byte.
        Returns:
        whether this primitive type is byte
      • isShort

        default boolean isShort()
        Returns whether this primitive type is short.
        Returns:
        whether this primitive type is short
      • isInt

        default boolean isInt()
        Returns whether this primitive type is int.
        Returns:
        whether this primitive type is int
      • isLong

        default boolean isLong()
        Returns whether this primitive type is long.
        Returns:
        whether this primitive type is long
      • isFloat

        default boolean isFloat()
        Returns whether this primitive type is float.
        Returns:
        whether this primitive type is float
      • isDouble

        default boolean isDouble()
        Returns whether this primitive type is double.
        Returns:
        whether this primitive type is double
      • isChar

        default boolean isChar()
        Returns whether this primitive type is char.
        Returns:
        whether this primitive type is char
      • kind

        default Type.Kind kind()
        Description copied from interface: Type
        Returns the kind of this type.
        Specified by:
        kind in interface Type
        Returns:
        the kind of this type
      • asPrimitive

        default PrimitiveType asPrimitive()
        Description copied from interface: Type
        Returns this type as a primitive type.
        Specified by:
        asPrimitive in interface Type
        Returns:
        this primitive type, never null