Package io.micronaut.inject.annotation
Class AnnotationMetadataSupport
java.lang.Object
io.micronaut.inject.annotation.AnnotationMetadataSupport
Support method for
AnnotationMetadata
.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AnnotationDefaultValuesProvider
The annotation default values provider. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Annotation>
TbuildAnnotation
(Class<T> annotationClass, @Nullable AnnotationValue<T> annotationValue) Builds the annotation based on the annotation value.static Map<String,
Map<CharSequence, Object>> static List<Map.Entry<Class<? extends Annotation>,
Class<? extends Annotation>>> static @NonNull Map<CharSequence,
Object> getDefaultValues
(String annotation) static @Nullable Map<CharSequence,
Object> getDefaultValuesOrNull
(String annotation) static String
getRepeatableAnnotation
(String annotation)
-
Field Details
-
ANNOTATION_DEFAULT_VALUES_PROVIDER
The annotation default values provider.- Since:
- 4.3.0
-
-
Constructor Details
-
AnnotationMetadataSupport
public AnnotationMetadataSupport()
-
-
Method Details
-
getCoreRepeatableAnnotations
@Internal public static List<Map.Entry<Class<? extends Annotation>,Class<? extends Annotation>>> getCoreRepeatableAnnotations()- Returns:
- core repeatable annotations
-
getCoreRepeatableAnnotationsContainers
- Returns:
- The core repeatable annotations.
- Since:
- 4.3.0
-
getCoreAnnotationDefaults
- Returns:
- The core annotation defaults.
- Since:
- 4.3.0
-
getDefaultValues
- Parameters:
annotation
- The annotation- Returns:
- The default values for the annotation
-
getDefaultValuesOrNull
@Nullable public static @Nullable Map<CharSequence,Object> getDefaultValuesOrNull(String annotation) - Parameters:
annotation
- The annotation- Returns:
- The default values for the annotation
-
getRepeatableAnnotation
- Parameters:
annotation
- The annotation- Returns:
- The repeatable annotation container.
-
buildAnnotation
@Internal public static <T extends Annotation> T buildAnnotation(Class<T> annotationClass, @Nullable @Nullable AnnotationValue<T> annotationValue) Builds the annotation based on the annotation value.- Type Parameters:
T
- The type- Parameters:
annotationClass
- The annotation classannotationValue
- The annotation value- Returns:
- The annotation
-