Closed
Description
Phil Webb opened SPR-17161 and commented
The existing AnnotationUtils
and AnnotatedElementUtils
have grown quite a bit over the years and could do with being revisited now that we have pretty comprehensive support for merged annotations throughout the framework.
Some common issues with the current utils classes include:
- Quite a broad API (~58 public methods between them) that can make it hard for users to find the right method.
- Some performance concerns. The classes often appear near the top when profiling applications and a typical application will synthesize quite a few annotations.
- Difficult to evolve. We have some ideas around using annotation processing at compile time to pre-compute some information. It's quite hard to currently plug this in to the existing code.
- Complicated meta-data relationships. There's quite a complicated relationship between
AnnotatedTypeMetadata
and the utils and the meta-data API is different.
A new API could help us to determine which methods are really needed and provide the potential for more intelligent caching or pre-computed data.
Affects: 5.1 RC1