public final class PrimitiveElement extends Object implements ArrayableClassElement
ClassElement of primitive types.| Modifier and Type | Field and Description |
|---|---|
static PrimitiveElement |
BOOLEAN |
static PrimitiveElement |
BYTE |
static PrimitiveElement |
CHAR |
static PrimitiveElement |
DOUBLE |
static PrimitiveElement |
FLOAT |
static PrimitiveElement |
INT |
static PrimitiveElement |
LONG |
static PrimitiveElement |
SHORT |
static PrimitiveElement |
VOID |
ZERO_CLASS_ELEMENTSEMPTY_ELEMENT_ARRAYCLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Modifier and Type | Method and Description |
|---|---|
AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
int |
getArrayDimensions()
If the type is an array, the number of dimensions.
|
String |
getName() |
Object |
getNativeType()
Returns the native underlying type.
|
boolean |
isArray()
Is the type an array.
|
boolean |
isAssignable(ClassElement type)
Tests whether one type is assignable to another.
|
boolean |
isAssignable(String type)
Tests whether one type is assignable to another.
|
boolean |
isPrimitive()
Whether the type is primitive.
|
boolean |
isProtected() |
boolean |
isPublic() |
static PrimitiveElement |
valueOf(String name) |
ClassElement |
withArrayDimensions(int arrayDimensions)
Convert the class element to an element for the same type, but with the given number of array dimensions.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromArray, toArrayaddAssociatedBean, foldBoundGenericTypes, getAllTypeArguments, getBeanProperties, getBoundGenericTypes, getCanonicalName, getDeclaredGenericPlaceholders, getDefaultConstructor, getEnclosedElement, getEnclosedElements, getEnclosingType, getFields, getFields, getFirstTypeArgument, getInterfaces, getPackage, getPackageName, getPrimaryConstructor, getRawClassElement, getSimpleName, getSuperType, getType, getTypeArguments, getTypeArguments, getTypeArguments, isAssignable, isEnum, isGenericPlaceholder, isInner, isInterface, isIterable, isOptional, isProxy, isRecord, isTypeVariable, isWildcard, of, of, of, of, of, of, withBoundGenericTypesgetGenericTypeannotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypebooleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypegetAnnotationValuesByName, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresentisDeclaredNonNull, isDeclaredNullable, isNonNull, isNullablepublic static final PrimitiveElement VOID
public static final PrimitiveElement BOOLEAN
public static final PrimitiveElement INT
public static final PrimitiveElement CHAR
public static final PrimitiveElement LONG
public static final PrimitiveElement FLOAT
public static final PrimitiveElement DOUBLE
public static final PrimitiveElement SHORT
public static final PrimitiveElement BYTE
public boolean isAssignable(String type)
ClassElementisAssignable in interface ClassElementtype - The type to checktrue if and only if this type is assignable to the secondpublic boolean isAssignable(ClassElement type)
ClassElementisAssignable in interface ClassElementtype - The type to checktrue if and only if this type is assignable to the secondpublic boolean isArray()
TypedElementisArray in interface TypedElementpublic int getArrayDimensions()
TypedElementgetArrayDimensions in interface TypedElementpublic boolean isProtected()
isProtected in interface Elementpublic boolean isPublic()
@NonNull public Object getNativeType()
ElementgetNativeType in interface Elementpublic AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProviderAnnotationMetadata.EMPTY_METADATA.getAnnotationMetadata in interface AnnotationMetadataProviderAnnotationMetadatapublic ClassElement withArrayDimensions(int arrayDimensions)
ArrayableClassElementwithArrayDimensions in interface ArrayableClassElementarrayDimensions - The number of array dimensions of the new class elementpublic boolean isPrimitive()
TypedElementisPrimitive in interface TypedElementpublic static PrimitiveElement valueOf(String name)