Package io.micronaut.inject.annotation
Class EvaluatedAnnotationMetadata
java.lang.Object
io.micronaut.inject.annotation.MappingAnnotationMetadataDelegate
io.micronaut.inject.annotation.EvaluatedAnnotationMetadata
- All Implemented Interfaces:
BeanContextConfigurable
,BeanDefinitionAware
,AnnotationMetadata
,AnnotationMetadataDelegate
,AnnotationMetadataProvider
,AnnotationSource
public final class EvaluatedAnnotationMetadata
extends MappingAnnotationMetadataDelegate
implements BeanContextConfigurable, BeanDefinitionAware
Variation of
AnnotationMetadata
that is used when evaluated expression
in annotation values need to be resolved at runtime.- Since:
- 4.0
- Author:
- Sergey Gavrilov
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(BeanContext context) Configure the component for the given bean context.Supplies the metadata.boolean
Does the metadata contain any evaluated expressions like#{ T(java.lang.Math).random() }
.<T extends Annotation>
AnnotationValue<T>void
setBeanDefinition
(BeanDefinition<?> beanDefinition) Configure the component for the given bean definition.withArguments
(@Nullable Object thisObject, Object[] args) Provide a copy of this annotation metadata with passed method arguments.static AnnotationMetadata
wrapIfNecessary
(AnnotationMetadata targetMetadata) Methods inherited from class io.micronaut.inject.annotation.MappingAnnotationMetadataDelegate
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, getAnnotation, getAnnotation, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, getValues, intValue, intValue, intValue, isFalse, isFalse, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, hasDeclaredStereotype, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
copyAnnotationMetadata, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, synthesizeAll, synthesizeDeclared
-
Method Details
-
getEvaluationContext
- Returns:
- The evaluation context.
- Since:
- 4.1.0
-
withArguments
public EvaluatedAnnotationMetadata withArguments(@Nullable @Nullable Object thisObject, Object[] args) Provide a copy of this annotation metadata with passed method arguments.- Parameters:
thisObject
- The object that represent this objectargs
- arguments passed to method- Returns:
- copy of annotation metadata
-
configure
Description copied from interface:BeanContextConfigurable
Configure the component for the given bean context.- Specified by:
configure
in interfaceBeanContextConfigurable
- Parameters:
context
- The bean context
-
setBeanDefinition
Description copied from interface:BeanDefinitionAware
Configure the component for the given bean definition.- Specified by:
setBeanDefinition
in interfaceBeanDefinitionAware
- Parameters:
beanDefinition
- The bean context
-
wrapIfNecessary
-
hasEvaluatedExpressions
public boolean hasEvaluatedExpressions()Description copied from interface:AnnotationMetadata
Does the metadata contain any evaluated expressions like#{ T(java.lang.Math).random() }
.- Specified by:
hasEvaluatedExpressions
in interfaceAnnotationMetadata
- Returns:
- True if evaluated expressions are present
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProvider
Supplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA
.- Specified by:
getAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Returns:
- The
AnnotationMetadata
-
mapAnnotationValue
- Specified by:
mapAnnotationValue
in classMappingAnnotationMetadataDelegate
-