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 Details Link icon

    • name Link icon

      String name()
      Returns the name of this primitive type.
      Returns:
      the name of this primitive type
    • primitiveKind Link icon

      Returns the kind of this primitive type.
      Returns:
      the kind of this primitive type
    • isBoolean Link icon

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

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

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

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

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

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

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

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

      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 Link icon

      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