Interface PrimitiveType
- All Superinterfaces:
AnnotationTarget
,Type
Primitive types are:
- boolean
- byte
- short
- int
- long
- float
- double
- char
- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The primitive type kind: boolean, byte, short, int, long, float, double, char -
Method Summary
Modifier and TypeMethodDescriptiondefault PrimitiveType
Returns this type as a primitive type.default boolean
Returns whether this primitive type isboolean
.default boolean
isByte()
Returns whether this primitive type isbyte
.default boolean
isChar()
Returns whether this primitive type ischar
.default boolean
isDouble()
Returns whether this primitive type isdouble
.default boolean
isFloat()
Returns whether this primitive type isfloat
.default boolean
isInt()
Returns whether this primitive type isint
.default boolean
isLong()
Returns whether this primitive type islong
.default boolean
isShort()
Returns whether this primitive type isshort
.default Type.Kind
kind()
Returns the kind of this type.name()
Returns the name of this primitive type.Returns the kind of this primitive type.Methods inherited from interface jakarta.enterprise.lang.model.AnnotationTarget
annotation, annotations, annotations, hasAnnotation, hasAnnotation, repeatableAnnotation
Methods inherited from interface jakarta.enterprise.lang.model.types.Type
asArray, asClass, asDeclaration, asParameterizedType, asType, asTypeVariable, asVoid, asWildcardType, isArray, isClass, isDeclaration, isParameterizedType, isPrimitive, isType, isTypeVariable, isVoid, isWildcardType
-
Method Details
-
name
String name()Returns the name of this primitive type.- Returns:
- the name of this primitive type
-
primitiveKind
PrimitiveType.PrimitiveKind primitiveKind()Returns the kind of this primitive type.- Returns:
- the kind of this primitive type
-
isBoolean
default boolean isBoolean()Returns whether this primitive type isboolean
.- Returns:
- whether this primitive type is
boolean
-
isByte
default boolean isByte()Returns whether this primitive type isbyte
.- Returns:
- whether this primitive type is
byte
-
isShort
default boolean isShort()Returns whether this primitive type isshort
.- Returns:
- whether this primitive type is
short
-
isInt
default boolean isInt()Returns whether this primitive type isint
.- Returns:
- whether this primitive type is
int
-
isLong
default boolean isLong()Returns whether this primitive type islong
.- Returns:
- whether this primitive type is
long
-
isFloat
default boolean isFloat()Returns whether this primitive type isfloat
.- Returns:
- whether this primitive type is
float
-
isDouble
default boolean isDouble()Returns whether this primitive type isdouble
.- Returns:
- whether this primitive type is
double
-
isChar
default boolean isChar()Returns whether this primitive type ischar
.- Returns:
- whether this primitive type is
char
-
kind
Description copied from interface:Type
Returns the kind of this type. -
asPrimitive
Description copied from interface:Type
Returns this type as a primitive type.- Specified by:
asPrimitive
in interfaceType
- Returns:
- this primitive type, never
null
-