At the moment, annotation processing uses HCANN. HCANN provides an abstraction from the domain model, but exposes {{ Annotation}} directly.
Ultimately we want to move away from HCANN to use Jandex for reading the annotation details. Jandex uses an abstraction from {{Annotation}} in the form of {{AnnotationInstance}}. Ultimately this move to Jandex will require lots of changes to that code.
{{ org.hibernate.boot.model.source}} was developed as an abstraction over the source of mapping information - annotations, {{orm.xml}}, {{hbm.xml}} with the initial intent of unifying the processing of mapping sources.
This is already how {{hbm.xml}} is processed. This work would apply that to annotations and {{orm.xml}} processing as well.
The approach has benefits in addition to the processing unification, such as -
# Avoiding use of library APIs in processing. Ultimately we want to move to Jandex over HCANN for annotation consumption - see [https://hibernate.atlassian.net/browse/HHH-9489|https://hibernate.atlassian.net/browse/HHH-9489|smart-link]. Using this abstraction will make that migration much simpler. # Allows support for both dynamic models (MAP mode) and {{entity-name}} models. This is important for deprecation of {{hbm.xml}} in favor of annotations / {{orm.xml}} - see [https://hibernate.atlassian.net/browse/HHH-15698|https://hibernate.atlassian.net/browse/HHH-15698|smart-link]. |
|