Package io.micronaut.inject.ast
Class PrimitiveElement
java.lang.Object
io.micronaut.inject.ast.PrimitiveElement
- All Implemented Interfaces:
AnnotatedElement
,AnnotationMetadata
,AnnotationMetadataDelegate
,AnnotationMetadataProvider
,AnnotationSource
,Described
,Named
,MutableAnnotationMetadataDelegate<Element>
,ArrayableClassElement
,ClassElement
,Element
,TypedElement
A
ClassElement
of primitive types.-
Field Summary
Modifier and TypeFieldDescriptionstatic final PrimitiveElement
static final PrimitiveElement
static final PrimitiveElement
static final PrimitiveElement
static final PrimitiveElement
static final PrimitiveElement
static final PrimitiveElement
static final PrimitiveElement
static final PrimitiveElement
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
Fields inherited from interface io.micronaut.inject.ast.ClassElement
ZERO_CLASS_ELEMENTS
Fields inherited from interface io.micronaut.inject.ast.Element
EMPTY_ELEMENT_ARRAY
Fields inherited from interface io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Supplies the metadata.int
If the type is an array, the number of dimensions.getName()
Returns the native underlying type.int
hashCode()
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
boolean
boolean
Whether the type is primitive.boolean
boolean
isPublic()
toString()
static PrimitiveElement
withAnnotationMetadata
(AnnotationMetadata annotationMetadata) Copies this element and overrides its annotations.withArrayDimensions
(int arrayDimensions) Convert the class element to an element for the same type, but with the given number of array dimensions.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, 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, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, 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
Methods inherited from interface io.micronaut.inject.ast.ArrayableClassElement
fromArray, toArray
Methods inherited from interface io.micronaut.inject.ast.ClassElement
addAssociatedBean, findDefaultStaticCreator, findField, findMethod, findStaticCreator, foldBoundGenericTypes, getAccessibleConstructors, getAccessibleStaticCreators, getAllTypeArguments, getBeanProperties, getBeanProperties, getBoundGenericTypes, getCanonicalName, getDeclaredGenericPlaceholders, getDefaultConstructor, getEnclosedElement, getEnclosedElements, getEnclosingType, getFields, getFirstTypeArgument, getInterfaces, getMethods, getOptionalValueType, getPackage, getPackageName, getPrimaryConstructor, getRawClassElement, getSimpleName, getSuperType, getSyntheticBeanProperties, getType, getTypeAnnotationMetadata, getTypeArguments, getTypeArguments, getTypeArguments, isAssignable, isContainerType, isEnum, isGenericPlaceholder, isInner, isInterface, isIterable, isOptional, isProxy, isRawType, isRecord, isTypeVariable, isWildcard, withBoundGenericTypes, withTypeArguments, withTypeArguments
Methods inherited from interface io.micronaut.inject.ast.Element
annotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
Methods inherited from interface io.micronaut.inject.ast.TypedElement
getGenericType, isVoid
-
Field Details
-
VOID
-
BOOLEAN
-
INT
-
CHAR
-
LONG
-
FLOAT
-
DOUBLE
-
SHORT
-
BYTE
-
-
Method Details
-
isAssignable
Description copied from interface:ClassElement
Tests whether one type is assignable to another.- Specified by:
isAssignable
in interfaceClassElement
- Parameters:
type
- The type to check- Returns:
true
if and only if this type is assignable to the second
-
isAssignable
Description copied from interface:ClassElement
Tests whether one type is assignable to another.- Specified by:
isAssignable
in interfaceClassElement
- Parameters:
type
- The type to check- Returns:
true
if and only if this type is assignable to the second
-
isArray
public boolean isArray()Description copied from interface:TypedElement
Is the type an array.- Specified by:
isArray
in interfaceTypedElement
- Returns:
- True if it is.
-
getArrayDimensions
public int getArrayDimensions()Description copied from interface:TypedElement
If the type is an array, the number of dimensions. String[] should return 1, String[][] should return 2- Specified by:
getArrayDimensions
in interfaceTypedElement
- Returns:
- The number of dimensions
-
getName
-
isProtected
public boolean isProtected()- Specified by:
isProtected
in interfaceElement
- Returns:
- True if the element is protected.
-
isPublic
public boolean isPublic() -
getNativeType
Description copied from interface:Element
Returns the native underlying type. This API is extended by all inject language implementations. The object returned by this method will be the language native type the information is being retrieved from.- Specified by:
getNativeType
in interfaceElement
- Returns:
- The native type
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProvider
Supplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA
.- Specified by:
getAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Returns:
- The
AnnotationMetadata
-
withArrayDimensions
Description copied from interface:ArrayableClassElement
Convert the class element to an element for the same type, but with the given number of array dimensions. Do not mutate the existing instance. Create a new instance instead.- Specified by:
withArrayDimensions
in interfaceArrayableClassElement
- Parameters:
arrayDimensions
- The number of array dimensions of the new class element- Returns:
- A new class element
-
withAnnotationMetadata
Description copied from interface:Element
Copies this element and overrides its annotations.- Specified by:
withAnnotationMetadata
in interfaceClassElement
- Specified by:
withAnnotationMetadata
in interfaceElement
- Parameters:
annotationMetadata
- The annotation metadata- Returns:
- A new element
-
isPrimitive
public boolean isPrimitive()Description copied from interface:TypedElement
Whether the type is primitive.- Specified by:
isPrimitive
in interfaceTypedElement
- Returns:
- True if it is
-
isNonNull
public boolean isNonNull()- Specified by:
isNonNull
in interfaceAnnotatedElement
- Returns:
- Whether the element is declared as not being null
-
isNullable
public boolean isNullable()- Specified by:
isNullable
in interfaceAnnotatedElement
- Returns:
- Whether the element is nullable.
-
valueOf
-
toString
-
equals
-
hashCode
public int hashCode()
-