Class AnnotationFactory
- java.lang.Object
-
- org.hibernate.annotations.common.annotationfactory.AnnotationFactory
-
public final class AnnotationFactory extends Object
Creates live annotations (actuallyAnnotationProxies) fromAnnotationDescriptors.- See Also:
AnnotationProxy
-
-
Constructor Summary
Constructors Constructor Description AnnotationFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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)
-
-
-
Method Detail
-
create
public static <T extends Annotation> T create(AnnotationDescriptor descriptor)
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
public static <T extends Annotation> T createUsingTccl(AnnotationDescriptor descriptor)
- 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
-
-