Class JavaReflectionManager
java.lang.Object
org.hibernate.annotations.common.reflection.java.JavaReflectionManager
- All Implemented Interfaces:
MetadataProviderInjector,ReflectionManager
public final class JavaReflectionManager
extends Object
implements ReflectionManager, MetadataProviderInjector
The factory for all the objects in this package.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildAnnotationReader(AnnotatedElement annotatedElement) booleanvoidreset()This resets any internal caches.voidsetMetadataProvider(MetadataProvider metadataProvider) Defines the metadata provider for a given Reflection ManagertoXPackage(Package pkg) org.hibernate.annotations.common.reflection.java.JavaXTypetoXType(TypeEnvironment context, Type propType)
-
Constructor Details
-
JavaReflectionManager
public JavaReflectionManager()
-
-
Method Details
-
getMetadataProvider
- Specified by:
getMetadataProviderin interfaceMetadataProviderInjector
-
setMetadataProvider
Description copied from interface:MetadataProviderInjectorDefines the metadata provider for a given Reflection Manager- Specified by:
setMetadataProviderin interfaceMetadataProviderInjector
-
toXClass
- Specified by:
toXClassin interfaceReflectionManager
-
toClass
- Specified by:
toClassin interfaceReflectionManager
-
toMethod
- Specified by:
toMethodin interfaceReflectionManager
-
toXPackage
- Specified by:
toXPackagein interfaceReflectionManager
-
toXType
public org.hibernate.annotations.common.reflection.java.JavaXType toXType(TypeEnvironment context, Type propType) -
toType
- Specified by:
toTypein interfaceReflectionManager
-
equals
- Specified by:
equalsin interfaceReflectionManager
-
toApproximatingEnvironment
-
buildAnnotationReader
- Specified by:
buildAnnotationReaderin interfaceReflectionManager
-
getDefaults
- Specified by:
getDefaultsin interfaceReflectionManager
-
reset
public void reset()Description copied from interface:ReflectionManagerThis resets any internal caches. This will free up memory in some implementations, at the cost of possibly being a bit slower if its services are needed again.Ideally the ReflectionManager should be discarded after use, but sometimes that's not posible. This method is intended to be used when there is reasonable expectation for te ReflectionManager to no longer be needed, while having the option to still use it in case the assumption doesn't hold true.
Careful: after invoking this method, returned X* instances will no longer honour any identity equality contract with X* instances which have been returned before resetting the cache.
This operation does not affect the configuration.- Specified by:
resetin interfaceReflectionManager
-