Package io.micronaut.inject.annotation
Class DefaultAnnotationMetadata
- java.lang.Object
-
- io.micronaut.inject.annotation.DefaultAnnotationMetadata
-
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadata,io.micronaut.core.annotation.AnnotationSource,java.lang.Cloneable
- Direct Known Subclasses:
MutableAnnotationMetadata
@Internal public class DefaultAnnotationMetadata extends java.lang.Object implements io.micronaut.core.annotation.AnnotationMetadata, java.lang.CloneableDefault implementation ofAnnotationMetadata.NOTE: Although required to be public This is an internal class and should not be referenced directly in user code
- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.annotation.Annotation>annotationMapprotected java.util.Map<java.lang.String,java.lang.annotation.Annotation>declaredAnnotationMap
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultAnnotationMetadata()Constructs empty annotation metadata.DefaultAnnotationMetadata(java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredAnnotations, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredStereotypes, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allStereotypes, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allAnnotations, java.util.Map<java.lang.String,java.util.List<java.lang.String>> annotationsByStereotype)This constructor is designed to be used by compile time produced subclasses.DefaultAnnotationMetadata(java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredAnnotations, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredStereotypes, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allStereotypes, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allAnnotations, java.util.Map<java.lang.String,java.util.List<java.lang.String>> annotationsByStereotype, boolean hasPropertyExpressions)This constructor is designed to be used by compile time produced subclasses.DefaultAnnotationMetadata(java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredAnnotations, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredStereotypes, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allStereotypes, java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allAnnotations, java.util.Map<java.lang.String,java.util.List<java.lang.String>> annotationsByStereotype, boolean hasPropertyExpressions, boolean useRepeatableDefaults)This constructor is designed to be used by compile time produced subclasses.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds an annotation and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds an annotation and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddAnnotationValuesFromData(java.util.List results, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds any annotation values found in the values map to the results.protected voidaddDeclaredAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds an annotation directly declared on the element and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddDeclaredAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds an annotation directly declared on the element and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddDeclaredRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable annotation value.protected voidaddDeclaredRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a repeatable annotation value.protected voidaddDeclaredRepeatableStereotype(java.util.List<java.lang.String> parents, java.lang.String stereotype, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable declared stereotype value.protected voidaddDeclaredStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddDeclaredStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddDefaultAnnotationValues(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds an annotation directly declared on the element and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable annotation value.protected voidaddRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a repeatable annotation value.protected voidaddRepeatableStereotype(java.util.List<java.lang.String> parents, java.lang.String stereotype, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable stereotype value.protected voidaddStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.protected voidaddValuesToResults(java.util.List<io.micronaut.core.annotation.AnnotationValue> results, io.micronaut.core.annotation.AnnotationValue values)Adds a values instance to the results.static booleanareAnnotationDefaultsRegistered(java.lang.String annotation)Returns whether annotation defaults are registered for the give annotation.java.util.Optional<java.lang.Boolean>booleanValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)java.util.Optional<java.lang.Boolean>booleanValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.java.util.Optional<java.lang.Boolean>booleanValue(java.lang.String annotation, java.lang.String member)java.util.Optional<java.lang.Boolean>booleanValue(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.java.util.Optional<java.lang.Class>classValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)java.util.Optional<java.lang.Class>classValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.java.util.Optional<java.lang.Class>classValue(java.lang.String annotation, java.lang.String member)java.util.Optional<java.lang.Class>classValue(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.<T> java.lang.Class<T>[]classValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)<T> java.lang.Class<T>[]classValues(java.lang.String annotation, java.lang.String member)DefaultAnnotationMetadataclone()protected <K,V>
java.util.Map<K,V>cloneMap(java.util.Map<K,V> map)protected <K,V>
java.util.Map<K,java.util.List<V>>cloneMapOfListValue(java.util.Map<K,java.util.List<V>> toClone)protected <X,Y,K>
java.util.Map<K,java.util.Map<X,Y>>cloneMapOfMapValue(java.util.Map<K,java.util.Map<X,Y>> toClone)static voidcontributeDefaults(io.micronaut.core.annotation.AnnotationMetadata target, io.micronaut.core.annotation.AnnotationMetadata source)Contributes defaults to the given target.static voidcontributeRepeatable(io.micronaut.core.annotation.AnnotationMetadata target, io.micronaut.core.annotation.AnnotationMetadata source)Contributes repeatable annotation metadata to the given target.static voidcontributeRepeatable(io.micronaut.core.annotation.AnnotationMetadata target, ClassElement classElement)Contributes repeatable annotation metadata to the given class element.java.util.OptionalDoubledoubleValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)java.util.OptionalDoubledoubleValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the double value and optionally map its value.java.util.OptionalDoubledoubleValue(java.lang.String annotation, java.lang.String member)java.util.OptionalDoubledoubleValue(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the double value and optionally map its value.<E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)<E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<E> enumType)<E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<E> enumType, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.<E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.String annotation, java.lang.Class<E> enumType)<E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.String annotation, java.lang.String member, java.lang.Class<E> enumType)<E extends java.lang.Enum>
java.util.Optional<E>enumValue(java.lang.String annotation, java.lang.String member, java.lang.Class<E> enumType, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.<E extends java.lang.Enum>
E[]enumValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)<E extends java.lang.Enum>
E[]enumValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<E> enumType)<E extends java.lang.Enum>
E[]enumValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<E> enumType, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)<E extends java.lang.Enum>
E[]enumValues(java.lang.String annotation, java.lang.Class<E> enumType)<E extends java.lang.Enum>
E[]enumValues(java.lang.String annotation, java.lang.String member, java.lang.Class<E> enumType)<E extends java.lang.Enum>
E[]enumValues(java.lang.String annotation, java.lang.String member, java.lang.Class<E> enumType, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)<T extends java.lang.annotation.Annotation>
java.util.Optional<io.micronaut.core.annotation.AnnotationValue<T>>findAnnotation(java.lang.String annotation)<T extends java.lang.annotation.Annotation>
java.util.Optional<io.micronaut.core.annotation.AnnotationValue<T>>findDeclaredAnnotation(java.lang.String annotation)java.util.Optional<java.lang.String>findRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)java.util.Optional<java.lang.String>findRepeatableAnnotation(java.lang.String annotation)java.util.Optional<java.lang.String>getAnnotationNameByStereotype(java.lang.String stereotype)java.util.Set<java.lang.String>getAnnotationNames()java.util.List<java.lang.String>getAnnotationNamesByStereotype(java.lang.String stereotype)java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationType(java.lang.String name)java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationType(java.lang.String name, java.lang.ClassLoader classLoader)java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>>getAnnotationTypeByStereotype(java.lang.String stereotype)<T extends java.lang.annotation.Annotation>
java.util.List<io.micronaut.core.annotation.AnnotationValue<T>>getAnnotationValuesByName(java.lang.String annotationType)<T extends java.lang.annotation.Annotation>
java.util.List<io.micronaut.core.annotation.AnnotationValue<T>>getAnnotationValuesByStereotype(java.lang.String stereotype)<T extends java.lang.annotation.Annotation>
java.util.List<io.micronaut.core.annotation.AnnotationValue<T>>getAnnotationValuesByType(java.lang.Class<T> annotationType)java.util.Set<java.lang.String>getDeclaredAnnotationNames()java.util.List<java.lang.String>getDeclaredAnnotationNamesByStereotype(java.lang.String stereotype)<T extends java.lang.annotation.Annotation>
java.util.List<io.micronaut.core.annotation.AnnotationValue<T>>getDeclaredAnnotationValuesByName(java.lang.String annotationType)<T extends java.lang.annotation.Annotation>
java.util.List<io.micronaut.core.annotation.AnnotationValue<T>>getDeclaredAnnotationValuesByType(java.lang.Class<T> annotationType)io.micronaut.core.annotation.AnnotationMetadatagetDeclaredMetadata()java.util.Set<java.lang.String>getDeclaredStereotypeAnnotationNames()<T> java.util.Optional<T>getDefaultValue(java.lang.String annotation, java.lang.String member, io.micronaut.core.type.Argument<T> requiredType)<T> java.util.Optional<T>getDefaultValue(java.lang.String annotation, java.lang.String member, java.lang.Class<T> requiredType)java.util.Map<java.lang.String,java.lang.Object>getDefaultValues(java.lang.String annotation)java.util.Set<java.lang.String>getStereotypeAnnotationNames()<T> java.util.Optional<T>getValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.lang.Class<T> requiredType)<T> java.util.Optional<T>getValue(java.lang.String annotation, java.lang.String member, io.micronaut.core.type.Argument<T> requiredType)<T> java.util.Optional<T>getValue(java.lang.String annotation, java.lang.String member, io.micronaut.core.type.Argument<T> requiredType, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Resolves the given value performing type conversion as necessary.java.util.Map<java.lang.CharSequence,java.lang.Object>getValues(java.lang.String annotation)<T> io.micronaut.core.value.OptionalValues<T>getValues(java.lang.String annotation, java.lang.Class<T> valueType)booleanhasAnnotation(java.lang.String annotation)booleanhasDeclaredAnnotation(java.lang.String annotation)booleanhasDeclaredStereotype(java.lang.String annotation)booleanhasPropertyExpressions()booleanhasStereotype(java.lang.String annotation)java.util.OptionalIntintValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)java.util.OptionalIntintValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the int value and optionally map its value.java.util.OptionalIntintValue(java.lang.String annotation, java.lang.String member)java.util.OptionalIntintValue(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the int value and optionally map its value.booleanisEmpty()booleanisFalse(java.lang.String annotation, java.lang.String member)booleanisPresent(java.lang.String annotation, java.lang.String member)booleanisRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)booleanisRepeatableAnnotation(java.lang.String annotation)booleanisTrue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)booleanisTrue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.booleanisTrue(java.lang.String annotation, java.lang.String member)booleanisTrue(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.java.util.OptionalLonglongValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)java.util.OptionalLonglongValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the long value and optionally map its value.java.util.OptionalLonglongValue(java.lang.String annotation, java.lang.String member)java.util.OptionalLonglongValue(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the long value and optionally map its value.static io.micronaut.core.annotation.AnnotationMetadatamutateMember(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.String annotationName, java.lang.String member, java.lang.Object value)Sets a member of the givenAnnotationMetadatareturn a new annotation metadata instance without mutating the existing.static io.micronaut.core.annotation.AnnotationMetadatamutateMember(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.String annotationName, java.util.Map<java.lang.CharSequence,java.lang.Object> members)Sets a member of the givenAnnotationMetadatareturn a new annotation metadata instance without mutating the existing.static voidregisterAnnotationDefaults(io.micronaut.core.annotation.AnnotationClassValue<?> annotation, java.util.Map<java.lang.String,java.lang.Object> defaultValues)Registers annotation default values.static voidregisterAnnotationDefaults(java.lang.String annotation, java.util.Map<java.lang.String,java.lang.Object> defaultValues)Registers annotation default values.static voidregisterAnnotationType(io.micronaut.core.annotation.AnnotationClassValue<?> annotation)Registers annotation default values.static voidregisterRepeatableAnnotations(java.util.Map<java.lang.String,java.lang.String> repeatableAnnotations)Registers repeatable annotations.protected voidremoveAnnotation(java.lang.String annotationType)Removes an annotation for the given annotation type.protected <A extends java.lang.annotation.Annotation>
voidremoveAnnotationIf(java.util.function.Predicate<io.micronaut.core.annotation.AnnotationValue<A>> predicate)Removes an annotation for the given predicate.protected voidremoveStereotype(java.lang.String annotationType)Removes a stereotype annotation for the given annotation type.java.util.Optional<java.lang.String>stringValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)java.util.Optional<java.lang.String>stringValue(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.java.util.Optional<java.lang.String>stringValue(java.lang.String annotation, java.lang.String member)java.util.Optional<java.lang.String>stringValue(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.java.lang.String[]stringValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member)java.lang.String[]stringValues(java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.java.lang.String[]stringValues(java.lang.String annotation, java.lang.String member)java.lang.String[]stringValues(java.lang.String annotation, java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.<T extends java.lang.annotation.Annotation>
Tsynthesize(java.lang.Class<T> annotationClass)<T extends java.lang.annotation.Annotation>
Tsynthesize(java.lang.Class<T> annotationClass, java.lang.String sourceAnnotation)java.lang.annotation.Annotation[]synthesizeAll()<T extends java.lang.annotation.Annotation>
T[]synthesizeAnnotationsByType(java.lang.Class<T> annotationClass)java.lang.annotation.Annotation[]synthesizeDeclared()<T extends java.lang.annotation.Annotation>
TsynthesizeDeclared(java.lang.Class<T> annotationClass)<T extends java.lang.annotation.Annotation>
TsynthesizeDeclared(java.lang.Class<T> annotationClass, java.lang.String sourceAnnotation)<T extends java.lang.annotation.Annotation>
T[]synthesizeDeclaredAnnotationsByType(java.lang.Class<T> annotationClass)-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
booleanValue, booleanValue, classValue, classValue, classValues, classValues, doubleValue, findAnnotation, findDeclaredAnnotation, getAnnotationNameByStereotype, getAnnotationNamesByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDefaultValue, getDefaultValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, hasAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, intValue, isAnnotationPresent, isAnnotationPresent, isDeclaredAnnotationPresent, isDeclaredAnnotationPresent, isFalse, isPresent, stringValue, stringValue, stringValues, stringValues
-
-
-
-
Constructor Detail
-
DefaultAnnotationMetadata
@Internal protected DefaultAnnotationMetadata()
Constructs empty annotation metadata.
-
DefaultAnnotationMetadata
@Internal public DefaultAnnotationMetadata(@Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredAnnotations, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredStereotypes, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allStereotypes, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allAnnotations, @Nullable java.util.Map<java.lang.String,java.util.List<java.lang.String>> annotationsByStereotype)This constructor is designed to be used by compile time produced subclasses.- Parameters:
declaredAnnotations- The directly declared annotationsdeclaredStereotypes- The directly declared stereotypesallStereotypes- All of the stereotypesallAnnotations- All of the annotationsannotationsByStereotype- The annotations by stereotype
-
DefaultAnnotationMetadata
@Internal public DefaultAnnotationMetadata(@Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredAnnotations, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredStereotypes, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allStereotypes, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allAnnotations, @Nullable java.util.Map<java.lang.String,java.util.List<java.lang.String>> annotationsByStereotype, boolean hasPropertyExpressions)This constructor is designed to be used by compile time produced subclasses.- Parameters:
declaredAnnotations- The directly declared annotationsdeclaredStereotypes- The directly declared stereotypesallStereotypes- All of the stereotypesallAnnotations- All of the annotationsannotationsByStereotype- The annotations by stereotypehasPropertyExpressions- Whether property expressions exist in the metadata
-
DefaultAnnotationMetadata
@Internal public DefaultAnnotationMetadata(@Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredAnnotations, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> declaredStereotypes, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allStereotypes, @Nullable java.util.Map<java.lang.String,java.util.Map<java.lang.CharSequence,java.lang.Object>> allAnnotations, @Nullable java.util.Map<java.lang.String,java.util.List<java.lang.String>> annotationsByStereotype, boolean hasPropertyExpressions, boolean useRepeatableDefaults)This constructor is designed to be used by compile time produced subclasses.- Parameters:
declaredAnnotations- The directly declared annotationsdeclaredStereotypes- The directly declared stereotypesallStereotypes- All of the stereotypesallAnnotations- All of the annotationsannotationsByStereotype- The annotations by stereotypehasPropertyExpressions- Whether property expressions exist in the metadatauseRepeatableDefaults- Use repeatable defaults
-
-
Method Detail
-
getDeclaredMetadata
@NonNull public io.micronaut.core.annotation.AnnotationMetadata getDeclaredMetadata()
- Specified by:
getDeclaredMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadata
-
hasPropertyExpressions
public boolean hasPropertyExpressions()
- Specified by:
hasPropertyExpressionsin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getDefaultValues
@NonNull public java.util.Map<java.lang.String,java.lang.Object> getDefaultValues(@NonNull java.lang.String annotation)- Specified by:
getDefaultValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
isPresent
public boolean isPresent(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
isPresentin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValue
public <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.String annotation, java.lang.Class<E> enumType)- Specified by:
enumValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValue
public <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)- Specified by:
enumValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValue
public <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)- Specified by:
enumValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValue
public <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)- Specified by:
enumValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValue
@Internal public <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationmember- The memberenumType- The enum typevalueMapper- The value mapper- Returns:
- The class value
-
enumValues
public <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.String annotation, java.lang.Class<E> enumType)- Specified by:
enumValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValues
public <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)- Specified by:
enumValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValues
public <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, java.lang.Class<E> enumType)- Specified by:
enumValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValues
public <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType)- Specified by:
enumValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
enumValues
public <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)
-
enumValues
public <E extends java.lang.Enum> E[] enumValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)
-
enumValue
@Internal public <E extends java.lang.Enum> java.util.Optional<E> enumValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.lang.Class<E> enumType, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.- Type Parameters:
E- The enum type- Parameters:
annotation- The annotationmember- The memberenumType- The enum typevalueMapper- The value mapper- Returns:
- The class value
-
classValues
public <T> java.lang.Class<T>[] classValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
classValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
classValues
public <T> java.lang.Class<T>[] classValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
classValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
classValue
@NonNull public java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
classValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
classValue
public java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The class value
-
classValue
@NonNull public java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
classValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
classValue
@Internal public java.util.Optional<java.lang.Class> classValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the class value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The class value
-
intValue
@NonNull public java.util.OptionalInt intValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
intValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
intValue
@NonNull public java.util.OptionalInt intValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
intValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
intValue
@Internal public java.util.OptionalInt intValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the int value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The int value
-
booleanValue
public java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
booleanValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
booleanValue
public java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
booleanValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
booleanValue
public java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The boolean value
-
booleanValue
@NonNull public java.util.Optional<java.lang.Boolean> booleanValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The boolean value
-
longValue
@NonNull public java.util.OptionalLong longValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
longValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
longValue
@NonNull public java.util.OptionalLong longValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
longValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
longValue
@Internal public java.util.OptionalLong longValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the long value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The long value
-
longValue
@NonNull public java.util.OptionalLong longValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the long value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The long value
-
intValue
@NonNull public java.util.OptionalInt intValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the int value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The int value
-
stringValue
@NonNull public java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
stringValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
stringValue
public java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The int value
-
stringValues
@NonNull public java.lang.String[] stringValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
stringValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
stringValues
@NonNull public java.lang.String[] stringValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
stringValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
stringValues
@NonNull public java.lang.String[] stringValues(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The int value
-
stringValues
@NonNull public java.lang.String[] stringValues(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The int value
-
stringValue
@NonNull public java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
stringValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
stringValue
@NonNull public java.util.Optional<java.lang.String> stringValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the string value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The string value
-
isTrue
public boolean isTrue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
isTruein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
isTrue
public boolean isTrue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The boolean value
-
isTrue
public boolean isTrue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
isTruein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
isTrue
public boolean isTrue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the boolean value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The boolean value
-
isFalse
public boolean isFalse(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
isFalsein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
doubleValue
@NonNull public java.util.OptionalDouble doubleValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member)- Specified by:
doubleValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
doubleValue
@NonNull public java.util.OptionalDouble doubleValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member)- Specified by:
doubleValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
doubleValue
@Internal public java.util.OptionalDouble doubleValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the double value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The double value
-
doubleValue
@NonNull @Internal public java.util.OptionalDouble doubleValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Retrieve the double value and optionally map its value.- Parameters:
annotation- The annotationmember- The membervalueMapper- The value mapper- Returns:
- The double value
-
getValue
@NonNull public <T> java.util.Optional<T> getValue(@NonNull java.lang.Class<? extends java.lang.annotation.Annotation> annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)- Specified by:
getValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getValue
@NonNull public <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull io.micronaut.core.type.Argument<T> requiredType)- Specified by:
getValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getValue
@NonNull public <T> java.util.Optional<T> getValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull io.micronaut.core.type.Argument<T> requiredType, @Nullable java.util.function.Function<java.lang.Object,java.lang.Object> valueMapper)Resolves the given value performing type conversion as necessary.- Type Parameters:
T- The generic type- Parameters:
annotation- The annotationmember- The memberrequiredType- The required typevalueMapper- The value mapper- Returns:
- The resolved value
-
getDefaultValue
@NonNull public <T> java.util.Optional<T> getDefaultValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull java.lang.Class<T> requiredType)- Specified by:
getDefaultValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationValuesByType
@NonNull public <T extends java.lang.annotation.Annotation> java.util.List<io.micronaut.core.annotation.AnnotationValue<T>> getAnnotationValuesByType(@Nullable java.lang.Class<T> annotationType)- Specified by:
getAnnotationValuesByTypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationValuesByName
public <T extends java.lang.annotation.Annotation> java.util.List<io.micronaut.core.annotation.AnnotationValue<T>> getAnnotationValuesByName(java.lang.String annotationType)
- Specified by:
getAnnotationValuesByNamein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getDeclaredAnnotationValuesByType
@NonNull public <T extends java.lang.annotation.Annotation> java.util.List<io.micronaut.core.annotation.AnnotationValue<T>> getDeclaredAnnotationValuesByType(@NonNull java.lang.Class<T> annotationType)- Specified by:
getDeclaredAnnotationValuesByTypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getDeclaredAnnotationValuesByName
public <T extends java.lang.annotation.Annotation> java.util.List<io.micronaut.core.annotation.AnnotationValue<T>> getDeclaredAnnotationValuesByName(java.lang.String annotationType)
- Specified by:
getDeclaredAnnotationValuesByNamein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
synthesizeAnnotationsByType
public <T extends java.lang.annotation.Annotation> T[] synthesizeAnnotationsByType(@NonNull java.lang.Class<T> annotationClass)- Specified by:
synthesizeAnnotationsByTypein interfaceio.micronaut.core.annotation.AnnotationSource
-
synthesizeDeclaredAnnotationsByType
public <T extends java.lang.annotation.Annotation> T[] synthesizeDeclaredAnnotationsByType(@NonNull java.lang.Class<T> annotationClass)- Specified by:
synthesizeDeclaredAnnotationsByTypein interfaceio.micronaut.core.annotation.AnnotationSource
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
hasDeclaredAnnotation
public boolean hasDeclaredAnnotation(java.lang.String annotation)
- Specified by:
hasDeclaredAnnotationin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
hasAnnotation
public boolean hasAnnotation(java.lang.String annotation)
- Specified by:
hasAnnotationin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
hasStereotype
public boolean hasStereotype(java.lang.String annotation)
- Specified by:
hasStereotypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
hasDeclaredStereotype
public boolean hasDeclaredStereotype(java.lang.String annotation)
- Specified by:
hasDeclaredStereotypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationTypeByStereotype
@NonNull public java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationTypeByStereotype(@Nullable java.lang.String stereotype)- Specified by:
getAnnotationTypeByStereotypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationNameByStereotype
@NonNull public java.util.Optional<java.lang.String> getAnnotationNameByStereotype(@Nullable java.lang.String stereotype)- Specified by:
getAnnotationNameByStereotypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationNamesByStereotype
@NonNull public java.util.List<java.lang.String> getAnnotationNamesByStereotype(@Nullable java.lang.String stereotype)- Specified by:
getAnnotationNamesByStereotypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationValuesByStereotype
public <T extends java.lang.annotation.Annotation> java.util.List<io.micronaut.core.annotation.AnnotationValue<T>> getAnnotationValuesByStereotype(java.lang.String stereotype)
- Specified by:
getAnnotationValuesByStereotypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationNames
@NonNull public java.util.Set<java.lang.String> getAnnotationNames()
- Specified by:
getAnnotationNamesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getStereotypeAnnotationNames
public java.util.Set<java.lang.String> getStereotypeAnnotationNames()
- Specified by:
getStereotypeAnnotationNamesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getDeclaredStereotypeAnnotationNames
public java.util.Set<java.lang.String> getDeclaredStereotypeAnnotationNames()
- Specified by:
getDeclaredStereotypeAnnotationNamesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getDeclaredAnnotationNames
@NonNull public java.util.Set<java.lang.String> getDeclaredAnnotationNames()
- Specified by:
getDeclaredAnnotationNamesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getDeclaredAnnotationNamesByStereotype
@NonNull public java.util.List<java.lang.String> getDeclaredAnnotationNamesByStereotype(@Nullable java.lang.String stereotype)- Specified by:
getDeclaredAnnotationNamesByStereotypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationType
@NonNull public java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationType(@NonNull java.lang.String name)- Specified by:
getAnnotationTypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getAnnotationType
@NonNull public java.util.Optional<java.lang.Class<? extends java.lang.annotation.Annotation>> getAnnotationType(@NonNull java.lang.String name, @NonNull java.lang.ClassLoader classLoader)- Specified by:
getAnnotationTypein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
findAnnotation
@NonNull public <T extends java.lang.annotation.Annotation> java.util.Optional<io.micronaut.core.annotation.AnnotationValue<T>> findAnnotation(@NonNull java.lang.String annotation)- Specified by:
findAnnotationin interfaceio.micronaut.core.annotation.AnnotationSource
-
findDeclaredAnnotation
@NonNull public <T extends java.lang.annotation.Annotation> java.util.Optional<io.micronaut.core.annotation.AnnotationValue<T>> findDeclaredAnnotation(@NonNull java.lang.String annotation)- Specified by:
findDeclaredAnnotationin interfaceio.micronaut.core.annotation.AnnotationSource
-
getValues
@NonNull public <T> io.micronaut.core.value.OptionalValues<T> getValues(@NonNull java.lang.String annotation, @NonNull java.lang.Class<T> valueType)- Specified by:
getValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getValues
@NonNull public java.util.Map<java.lang.CharSequence,java.lang.Object> getValues(@NonNull java.lang.String annotation)- Specified by:
getValuesin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
getDefaultValue
@NonNull public <T> java.util.Optional<T> getDefaultValue(@NonNull java.lang.String annotation, @NonNull java.lang.String member, @NonNull io.micronaut.core.type.Argument<T> requiredType)- Specified by:
getDefaultValuein interfaceio.micronaut.core.annotation.AnnotationMetadata
-
isRepeatableAnnotation
public boolean isRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
- Specified by:
isRepeatableAnnotationin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
isRepeatableAnnotation
public boolean isRepeatableAnnotation(java.lang.String annotation)
- Specified by:
isRepeatableAnnotationin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
findRepeatableAnnotation
public java.util.Optional<java.lang.String> findRepeatableAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
- Specified by:
findRepeatableAnnotationin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
findRepeatableAnnotation
public java.util.Optional<java.lang.String> findRepeatableAnnotation(java.lang.String annotation)
- Specified by:
findRepeatableAnnotationin interfaceio.micronaut.core.annotation.AnnotationMetadata
-
clone
public DefaultAnnotationMetadata clone()
- Overrides:
clonein classjava.lang.Object
-
cloneMapOfMapValue
protected final <X,Y,K> java.util.Map<K,java.util.Map<X,Y>> cloneMapOfMapValue(java.util.Map<K,java.util.Map<X,Y>> toClone)
-
cloneMapOfListValue
protected final <K,V> java.util.Map<K,java.util.List<V>> cloneMapOfListValue(java.util.Map<K,java.util.List<V>> toClone)
-
cloneMap
protected final <K,V> java.util.Map<K,V> cloneMap(java.util.Map<K,V> map)
-
addAnnotation
protected void addAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds an annotation and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
annotation- The annotationvalues- The values
-
addAnnotation
protected void addAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds an annotation and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
annotation- The annotationvalues- The valuesretentionPolicy- The retention policy
-
addDefaultAnnotationValues
protected final void addDefaultAnnotationValues(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds an annotation directly declared on the element and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
annotation- The annotationvalues- The values
-
areAnnotationDefaultsRegistered
@Internal public static boolean areAnnotationDefaultsRegistered(java.lang.String annotation)
Returns whether annotation defaults are registered for the give annotation. Used by generated byte code. DO NOT REMOVE.- Parameters:
annotation- The annotation name- Returns:
- True if defaults have already been registered
-
registerAnnotationDefaults
@Internal public static void registerAnnotationDefaults(java.lang.String annotation, java.util.Map<java.lang.String,java.lang.Object> defaultValues)Registers annotation default values. Used by generated byte code. DO NOT REMOVE.- Parameters:
annotation- The annotation namedefaultValues- The default values
-
registerAnnotationDefaults
@Internal public static void registerAnnotationDefaults(io.micronaut.core.annotation.AnnotationClassValue<?> annotation, java.util.Map<java.lang.String,java.lang.Object> defaultValues)Registers annotation default values. Used by generated byte code. DO NOT REMOVE.- Parameters:
annotation- The annotation namedefaultValues- The default values
-
registerAnnotationType
@Internal public static void registerAnnotationType(io.micronaut.core.annotation.AnnotationClassValue<?> annotation)
Registers annotation default values. Used by generated byte code. DO NOT REMOVE.- Parameters:
annotation- The annotation
-
registerRepeatableAnnotations
@Internal public static void registerRepeatableAnnotations(java.util.Map<java.lang.String,java.lang.String> repeatableAnnotations)
Registers repeatable annotations. Annotation container -> annotations item. Used by generated byte code. DO NOT REMOVE.- Parameters:
repeatableAnnotations- The annotation
-
addRepeatable
protected void addRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable annotation value. If a value already exists will be added- Parameters:
annotationName- The annotation nameannotationValue- The annotation value
-
addRepeatable
protected void addRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a repeatable annotation value. If a value already exists will be added- Parameters:
annotationName- The annotation nameannotationValue- The annotation valueretentionPolicy- The retention policy
-
addRepeatableStereotype
protected void addRepeatableStereotype(java.util.List<java.lang.String> parents, java.lang.String stereotype, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable stereotype value. If a value already exists will be added- Parameters:
parents- The parent annotationsstereotype- The annotation nameannotationValue- The annotation value
-
addDeclaredRepeatableStereotype
protected void addDeclaredRepeatableStereotype(java.util.List<java.lang.String> parents, java.lang.String stereotype, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable declared stereotype value. If a value already exists will be added- Parameters:
parents- The parent annotationsstereotype- The annotation nameannotationValue- The annotation value
-
addDeclaredRepeatable
protected void addDeclaredRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue)Adds a repeatable annotation value. If a value already exists will be added- Parameters:
annotationName- The annotation nameannotationValue- The annotation value
-
addDeclaredRepeatable
protected void addDeclaredRepeatable(java.lang.String annotationName, io.micronaut.core.annotation.AnnotationValue annotationValue, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a repeatable annotation value. If a value already exists will be added- Parameters:
annotationName- The annotation nameannotationValue- The annotation valueretentionPolicy- The retention policy
-
addStereotype
protected final void addStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
parentAnnotations- The parent annotationsstereotype- The annotationvalues- The values
-
addStereotype
protected final void addStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
parentAnnotations- The parent annotationsstereotype- The annotationvalues- The valuesretentionPolicy- The retention policy
-
addDeclaredStereotype
protected void addDeclaredStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
parentAnnotations- The parent annotationsstereotype- The annotationvalues- The values
-
addDeclaredStereotype
protected void addDeclaredStereotype(java.util.List<java.lang.String> parentAnnotations, java.lang.String stereotype, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds a stereotype and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
parentAnnotations- The parent annotationsstereotype- The annotationvalues- The valuesretentionPolicy- The retention policy
-
addDeclaredAnnotation
protected void addDeclaredAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds an annotation directly declared on the element and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
annotation- The annotationvalues- The values
-
addDeclaredAnnotation
protected void addDeclaredAnnotation(java.lang.String annotation, java.util.Map<java.lang.CharSequence,java.lang.Object> values, java.lang.annotation.RetentionPolicy retentionPolicy)Adds an annotation directly declared on the element and its member values, if the annotation already exists the data will be merged with existing values replaced.- Parameters:
annotation- The annotationvalues- The valuesretentionPolicy- The retention policy
-
mutateMember
@Internal public static io.micronaut.core.annotation.AnnotationMetadata mutateMember(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.String annotationName, java.lang.String member, java.lang.Object value)Sets a member of the given
AnnotationMetadatareturn a new annotation metadata instance without mutating the existing.WARNING: for internal use only be the framework
- Parameters:
annotationMetadata- The metadataannotationName- The annotation namemember- The membervalue- The value- Returns:
- The metadata
-
contributeDefaults
@Internal public static void contributeDefaults(io.micronaut.core.annotation.AnnotationMetadata target, io.micronaut.core.annotation.AnnotationMetadata source)Contributes defaults to the given target.WARNING: for internal use only be the framework
- Parameters:
target- The targetsource- The source
-
contributeRepeatable
@Internal public static void contributeRepeatable(io.micronaut.core.annotation.AnnotationMetadata target, io.micronaut.core.annotation.AnnotationMetadata source)Contributes repeatable annotation metadata to the given target.WARNING: for internal use only be the framework
- Parameters:
target- The targetsource- The source
-
contributeRepeatable
@Internal public static void contributeRepeatable(io.micronaut.core.annotation.AnnotationMetadata target, ClassElement classElement)Contributes repeatable annotation metadata to the given class element.WARNING: for internal use only be the framework
- Parameters:
target- The targetclassElement- The source
-
mutateMember
@Internal public static io.micronaut.core.annotation.AnnotationMetadata mutateMember(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.String annotationName, java.util.Map<java.lang.CharSequence,java.lang.Object> members)Sets a member of the given
AnnotationMetadatareturn a new annotation metadata instance without mutating the existing.WARNING: for internal use only be the framework
- Parameters:
annotationMetadata- The metadataannotationName- The annotation namemembers- The key/value set of members and values- Returns:
- The metadata
-
removeAnnotationIf
protected <A extends java.lang.annotation.Annotation> void removeAnnotationIf(@NonNull java.util.function.Predicate<io.micronaut.core.annotation.AnnotationValue<A>> predicate)Removes an annotation for the given predicate.- Type Parameters:
A- The annotation- Parameters:
predicate- The predicate
-
removeAnnotation
protected void removeAnnotation(java.lang.String annotationType)
Removes an annotation for the given annotation type.- Parameters:
annotationType- The annotation type- Since:
- 3.0.0
-
removeStereotype
protected void removeStereotype(java.lang.String annotationType)
Removes a stereotype annotation for the given annotation type.- Parameters:
annotationType- The annotation type- Since:
- 3.0.0
-
synthesize
@Nullable public <T extends java.lang.annotation.Annotation> T synthesize(@NonNull java.lang.Class<T> annotationClass)- Specified by:
synthesizein interfaceio.micronaut.core.annotation.AnnotationSource
-
synthesize
@Nullable public <T extends java.lang.annotation.Annotation> T synthesize(@NonNull java.lang.Class<T> annotationClass, @NonNull java.lang.String sourceAnnotation)- Specified by:
synthesizein interfaceio.micronaut.core.annotation.AnnotationSource
-
synthesizeDeclared
@Nullable public <T extends java.lang.annotation.Annotation> T synthesizeDeclared(@NonNull java.lang.Class<T> annotationClass, @NonNull java.lang.String sourceAnnotation)- Specified by:
synthesizeDeclaredin interfaceio.micronaut.core.annotation.AnnotationSource
-
synthesizeDeclared
@Nullable public <T extends java.lang.annotation.Annotation> T synthesizeDeclared(@NonNull java.lang.Class<T> annotationClass)- Specified by:
synthesizeDeclaredin interfaceio.micronaut.core.annotation.AnnotationSource
-
synthesizeAll
@NonNull public java.lang.annotation.Annotation[] synthesizeAll()
- Specified by:
synthesizeAllin interfaceio.micronaut.core.annotation.AnnotationSource
-
synthesizeDeclared
@NonNull public java.lang.annotation.Annotation[] synthesizeDeclared()
- Specified by:
synthesizeDeclaredin interfaceio.micronaut.core.annotation.AnnotationSource
-
addAnnotationValuesFromData
protected final void addAnnotationValuesFromData(java.util.List results, java.util.Map<java.lang.CharSequence,java.lang.Object> values)Adds any annotation values found in the values map to the results.- Parameters:
results- The resultsvalues- The values
-
addValuesToResults
protected void addValuesToResults(java.util.List<io.micronaut.core.annotation.AnnotationValue> results, io.micronaut.core.annotation.AnnotationValue values)Adds a values instance to the results.- Parameters:
results- The resultsvalues- The values
-
-