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
FieldsModifier and TypeFieldDescriptionstatic final PrimitiveElementstatic final PrimitiveElementstatic final PrimitiveElementstatic final PrimitiveElementstatic final PrimitiveElementstatic final PrimitiveElementstatic final PrimitiveElementstatic final PrimitiveElementstatic final PrimitiveElementFields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTYFields inherited from interface io.micronaut.inject.ast.ClassElement
ZERO_CLASS_ELEMENTSFields inherited from interface io.micronaut.inject.ast.Element
EMPTY_ELEMENT_ARRAYFields inherited from interface io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionbooleanSupplies the metadata.intIf the type is an array, the number of dimensions.getName()Returns the native underlying type.inthashCode()booleanisArray()Is the type an array.booleanisAssignable(ClassElement type) Tests whether one type is assignable to another.booleanisAssignable(String type) Tests whether one type is assignable to another.booleanbooleanbooleanWhether the type is primitive.booleanbooleanisPublic()toString()static PrimitiveElementwithAnnotationMetadata(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, waitMethods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullableMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods 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, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.inject.ast.ArrayableClassElement
fromArray, toArrayMethods 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, hasUnresolvedTypes, isAssignable, isContainerType, isEnum, isGenericPlaceholder, isInner, isInterface, isIterable, isOptional, isProxy, isRawType, isRecord, isTypeVariable, isWildcard, withBoundGenericTypes, withTypeArguments, withTypeArgumentsMethods 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, removeStereotypeMethods 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:ClassElementTests whether one type is assignable to another.- Specified by:
isAssignablein interfaceClassElement- Parameters:
type- The type to check- Returns:
trueif and only if this type is assignable to the second
-
isAssignable
Description copied from interface:ClassElementTests whether one type is assignable to another.- Specified by:
isAssignablein interfaceClassElement- Parameters:
type- The type to check- Returns:
trueif and only if this type is assignable to the second
-
isArray
public boolean isArray()Description copied from interface:TypedElementIs the type an array.- Specified by:
isArrayin interfaceTypedElement- Returns:
- True if it is.
-
getArrayDimensions
public int getArrayDimensions()Description copied from interface:TypedElementIf the type is an array, the number of dimensions. String[] should return 1, String[][] should return 2- Specified by:
getArrayDimensionsin interfaceTypedElement- Returns:
- The number of dimensions
-
getName
-
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceElement- Returns:
- True if the element is protected.
-
isPublic
public boolean isPublic() -
getNativeType
Description copied from interface:ElementReturns 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:
getNativeTypein interfaceElement- Returns:
- The native type
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
withArrayDimensions
Description copied from interface:ArrayableClassElementConvert 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:
withArrayDimensionsin interfaceArrayableClassElement- Parameters:
arrayDimensions- The number of array dimensions of the new class element- Returns:
- A new class element
-
withAnnotationMetadata
Description copied from interface:ElementCopies this element and overrides its annotations.- Specified by:
withAnnotationMetadatain interfaceClassElement- Specified by:
withAnnotationMetadatain interfaceElement- Parameters:
annotationMetadata- The annotation metadata- Returns:
- A new element
-
isPrimitive
public boolean isPrimitive()Description copied from interface:TypedElementWhether the type is primitive.- Specified by:
isPrimitivein interfaceTypedElement- Returns:
- True if it is
-
isNonNull
public boolean isNonNull()- Specified by:
isNonNullin interfaceAnnotatedElement- Returns:
- Whether the element is declared as not being null
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceAnnotatedElement- Returns:
- Whether the element is nullable.
-
valueOf
-
toString
-
equals
-
hashCode
public int hashCode()
-