-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: taskA general taskA general task
Milestone
Description
It's currently quite hard to convert a MergedAnnotation
to an AnnotationAttributes
instance. At one point early in the design we had a factory method on AnnotationAttributes
that allowed it to be used with asMap
:
mergedAnnotation.asMap(AnnotationAttributes::ifPresent);
We removed that because it wasn't great having an asMap
method that could return null
.
Originally I didn't want to tie MergedAnnotation
to AnnotationAttributes
because I thought there was too much overlap. In hindsight, I'm not sure we can ever remove AnnotationAttributes
so perhaps we should just embrace it and add an asAnnotationAttributes
method. We could even drop asMap
and the custom factory version which probably only exists to support AnnotationAttributes
.
We should also reconsider the MapValues
enum name. It's not that great.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: taskA general taskA general task