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_MEMBERFields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(BeanContext context) Configure the component for the given bean context.Supplies the metadata.booleanDoes the metadata contain any evaluated expressions like#{ T(java.lang.Math).random() }.<T extends Annotation>
AnnotationValue<T>voidsetBeanDefinition(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 AnnotationMetadatawrapIfNecessary(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, synthesizeDeclaredAnnotationsByTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, hasDeclaredStereotype, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods 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:BeanContextConfigurableConfigure the component for the given bean context.- Specified by:
configurein interfaceBeanContextConfigurable- Parameters:
context- The bean context
-
setBeanDefinition
Description copied from interface:BeanDefinitionAwareConfigure the component for the given bean definition.- Specified by:
setBeanDefinitionin interfaceBeanDefinitionAware- Parameters:
beanDefinition- The bean context
-
wrapIfNecessary
-
hasEvaluatedExpressions
public boolean hasEvaluatedExpressions()Description copied from interface:AnnotationMetadataDoes the metadata contain any evaluated expressions like#{ T(java.lang.Math).random() }.- Specified by:
hasEvaluatedExpressionsin interfaceAnnotationMetadata- Returns:
- True if evaluated expressions are present
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
mapAnnotationValue
- Specified by:
mapAnnotationValuein classMappingAnnotationMetadataDelegate
-