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 -- Allows for "dynamic models"
-
Avoids prematurely loading these references into the
ClassLoader.
- See Also:
-
ClassDescriptionIndicates a problem accessing annotation details from the domain model sources.Generally indicates an attempt to resolve a ClassDetails into the corresponding Java Class when the ClassDetails does not specify a class name.Indicates an illegal cast through one of the safe cast methods such as AnnotationTarget.asClassDetails(), AnnotationTarget.asMemberDetails(), etc.Marks the annotated Java element as incubating, potentially recursively.Marks the annotated Java element as forming part of the internal implementation of Hibernate, meaning that clients should expect absolutely no guarantees with regard to the binary stability from release to release.Base exception for hibernate-modelsGenerally indicates an attempt to call an unknown/unhandled method on an annotation proxy.Indicates an attempt to access a non-existent annotation attributeIndicates an attempt to access an unknown class by name