Class AnnotationFactory
java.lang.Object
org.hibernate.annotations.common.annotationfactory.AnnotationFactory
Creates live annotations (actually
AnnotationProxies) from AnnotationDescriptors.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Annotation>
Tcreate(AnnotationDescriptor descriptor) Creates an Annotation proxy for the given annotation descriptor.static <T extends Annotation>
Tcreate(AnnotationDescriptor descriptor, ClassLoader classLoader) Overloaded form of Annotation proxy creation that accepts an explicit ClassLoader.static <T extends Annotation>
TcreateUsingTccl(AnnotationDescriptor descriptor)
-
Constructor Details
-
AnnotationFactory
public AnnotationFactory()
-
-
Method Details
-
create
Creates an Annotation proxy for the given annotation descriptor. NOTE: the proxy here is generated using the ClassLoader of the Annotation type's Class. E.g., if asked to create an Annotation proxy for javax.persistence.Entity we would use the ClassLoader of the javax.persistence.Entity Class for generating the proxy.- Parameters:
descriptor- The annotation descriptor- Returns:
- The annotation proxy
-
createUsingTccl
- Parameters:
descriptor- The annotation descriptor- Returns:
- The annotation proxy
-
create
public static <T extends Annotation> T create(AnnotationDescriptor descriptor, ClassLoader classLoader) Overloaded form of Annotation proxy creation that accepts an explicit ClassLoader.- Parameters:
descriptor- The annotation descriptorclassLoader- The ClassLoader to be used in defining the proxy- Returns:
- The annotation proxy
-