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 Constructor Description JavaReflectionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationReaderbuildAnnotationReader(AnnotatedElement annotatedElement)booleanequals(XClass class1, Class class2)MapgetDefaults()MetadataProvidergetMetadataProvider()voidreset()This resets any internal caches.voidsetMetadataProvider(MetadataProvider metadataProvider)Defines the metadata provider for a given Reflection ManagerTypeEnvironmenttoApproximatingEnvironment(TypeEnvironment context)ClasstoClass(XClass xClazz)MethodtoMethod(XMethod xMethod)TypetoType(XClass xClazz)XClasstoXClass(Class clazz)XPackagetoXPackage(Package pkg)org.hibernate.annotations.common.reflection.java.JavaXTypetoXType(TypeEnvironment context, Type propType)
-
-
-
Method Detail
-
getMetadataProvider
public MetadataProvider getMetadataProvider()
- Specified by:
getMetadataProviderin interfaceMetadataProviderInjector
-
setMetadataProvider
public void setMetadataProvider(MetadataProvider metadataProvider)
Description copied from interface:MetadataProviderInjectorDefines the metadata provider for a given Reflection Manager- Specified by:
setMetadataProviderin interfaceMetadataProviderInjector
-
toXClass
public XClass toXClass(Class clazz)
- Specified by:
toXClassin interfaceReflectionManager
-
toClass
public Class toClass(XClass xClazz)
- Specified by:
toClassin interfaceReflectionManager
-
toMethod
public Method toMethod(XMethod xMethod)
- Specified by:
toMethodin interfaceReflectionManager
-
toXPackage
public XPackage toXPackage(Package pkg)
- Specified by:
toXPackagein interfaceReflectionManager
-
toXType
public org.hibernate.annotations.common.reflection.java.JavaXType toXType(TypeEnvironment context, Type propType)
-
toType
public Type toType(XClass xClazz)
- Specified by:
toTypein interfaceReflectionManager
-
equals
public boolean equals(XClass class1, Class class2)
- Specified by:
equalsin interfaceReflectionManager
-
toApproximatingEnvironment
public TypeEnvironment toApproximatingEnvironment(TypeEnvironment context)
-
buildAnnotationReader
public AnnotationReader buildAnnotationReader(AnnotatedElement annotatedElement)
- Specified by:
buildAnnotationReaderin interfaceReflectionManager
-
getDefaults
public Map 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
-
-