This issue collects the various tasks and ideas related to overhauling our annotation handling code. This issue will be edited as additional ideas arise.

Prerequisites

These tasks will generally help with implementing the new API:

  • [x] #22561

API Improvements

These are the core API related tasks:

  • [x] #21697
  • [x] #22562

Minor Performance Improvements

Initially the new API will cause an additional overhead. We can reclaim a few milliseconds in a few other areas of the framework to help:

  • [x] #22563
  • [x] #22564
  • [x] #22565
  • [x] #22566
  • [x] #22567
  • [x] #22568
  • [x] #22570
  • [x] #22579
  • [x] #22580
  • [x] #22420

Migrate classes to use the new API directly

A few classes would benefit from using the new annotations API directly. Especially relevant are any areas of the code that make several utils calls, when they could hold onto a MergedAnnotations instance:

  • [x] #22581
  • [x] #22582
  • [x] #22584
  • [x] #22657

Make use of annotation index

Indexing annotations to do less work may help performance.

  • ~~#22569~~
  • ~~#22578~~
  • ~~Investigate logic based annotation indexes (e.g. Jackson classes won't have Spring annotations)~~

Overhaul metadata code

The existing ASM based meta-data reader code currently recursively processes annotations. The new MergedAnnotations API may be suitable to expose directly. It might also be possible to not use ASM when reading meta-annotations and instead just use standard reflection.

  • [x] Refactor ASM annotation reading code
  • [x] #22884

Accidentally introduced regressions

  • [x] #22654
  • [x] #22655
  • [x] #22685
  • [x] #22696

Comment From: sbrannen

Closing this issue umbrella issue since all related issues have been addressed.