Interface PrimitiveType
- All Superinterfaces:
AnnotationTarget,Type
Primitive types are:
- boolean
- byte
- short
- int
- long
- float
- double
- char
- Since:
- 4.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault PrimitiveTypeReturns this type as a primitive type.default booleanReturns whether this primitive type isboolean.default booleanisByte()Returns whether this primitive type isbyte.default booleanisChar()Returns whether this primitive type ischar.default booleanisDouble()Returns whether this primitive type isdouble.default booleanisFloat()Returns whether this primitive type isfloat.default booleanisInt()Returns whether this primitive type isint.default booleanisLong()Returns whether this primitive type islong.default booleanisShort()Returns whether this primitive type isshort.default Type.Kindkind()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, repeatableAnnotationMethods 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:TypeReturns the kind of this type. -
asPrimitive
Description copied from interface:TypeReturns this type as a primitive type.- Specified by:
asPrimitivein interfaceType- Returns:
- this primitive type, never
null
-