Package org.hibernate.models


@Incubating package org.hibernate.models
A de-typed abstraction over "reflection" and annotations (and in the case of Hibernate ORM, mapping XML also).

Uses a mix of Jandex and Java reflection to build a de-typed abstraction model of classes and annotations referenced by an application's managed resources.

Consumers can then access details from that abstraction model in a unified way, regardless of the underlying source (Jandex or reflection). For classes which we are able to access from a Jandex index, this has the benefit that the classes are not loaded into the ClassLoader; which is important because once a classes is loaded into a ClassLoader, its bytecode cannot be changed and run-time bytecode enhancement is not possible.

This work is intended to replace the hibernate-commons-annotation library, which suffered from a number of shortcomings.

This abstraction model is largely a mirror of Class, Field, Method and Annotation. The 2 main reasons for this are -

  1. Allows for "dynamic models"
  2. Avoids prematurely loading these references into the ClassLoader.
See Also: