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_ELEMENTS
EMPTY_ELEMENT_ARRAY
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
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, wait
fromArray, toArray
addAssociatedBean, 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, withBoundGenericTypes
getGenericType
annotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
booleanValue, 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, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, 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, synthesizeDeclaredAnnotationsByType
getAnnotationValuesByName, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
public 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)
ClassElement
isAssignable
in interface ClassElement
type
- The type to checktrue
if and only if this type is assignable to the secondpublic boolean isAssignable(ClassElement type)
ClassElement
isAssignable
in interface ClassElement
type
- The type to checktrue
if and only if this type is assignable to the secondpublic boolean isArray()
TypedElement
isArray
in interface TypedElement
public int getArrayDimensions()
TypedElement
getArrayDimensions
in interface TypedElement
public boolean isProtected()
isProtected
in interface Element
public boolean isPublic()
@NonNull public Object getNativeType()
Element
getNativeType
in interface Element
public AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProvider
AnnotationMetadata.EMPTY_METADATA
.getAnnotationMetadata
in interface AnnotationMetadataProvider
AnnotationMetadata
public ClassElement withArrayDimensions(int arrayDimensions)
ArrayableClassElement
withArrayDimensions
in interface ArrayableClassElement
arrayDimensions
- The number of array dimensions of the new class elementpublic boolean isPrimitive()
TypedElement
isPrimitive
in interface TypedElement
public static PrimitiveElement valueOf(String name)