Class ReflectionTools
- java.lang.Object
-
- org.hibernate.envers.internal.tools.ReflectionTools
-
public abstract class ReflectionTools extends Object
- Author:
- Adam Warski (adam at warski dot org), Lukasz Antoniak (lukasz dot antoniak at gmail dot com), Chris Cranford
-
-
Constructor Summary
Constructors Constructor Description ReflectionTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FieldgetField(Class cls, PropertyData propertyData)static org.hibernate.property.access.spi.GettergetGetter(Class cls, String propertyName, String accessorType, org.hibernate.service.ServiceRegistry serviceRegistry)static org.hibernate.property.access.spi.GettergetGetter(Class cls, PropertyData propertyData, org.hibernate.service.ServiceRegistry serviceRegistry)static XPropertygetProperty(XClass clazz, String propertyName)static XPropertygetProperty(XClass clazz, String propertyName, String accessType)static org.hibernate.property.access.spi.SettergetSetter(Class cls, String propertyName, String accessorType, org.hibernate.service.ServiceRegistry serviceRegistry)static org.hibernate.property.access.spi.SettergetSetter(Class cls, PropertyData propertyData, org.hibernate.service.ServiceRegistry serviceRegistry)static Class<?>getType(Class cls, PropertyData propertyData, org.hibernate.service.ServiceRegistry serviceRegistry)static <T> Class<T>loadClass(String name, org.hibernate.boot.registry.classloading.spi.ClassLoaderService classLoaderService)Locate class with a given name.
-
-
-
Method Detail
-
getGetter
public static org.hibernate.property.access.spi.Getter getGetter(Class cls, PropertyData propertyData, org.hibernate.service.ServiceRegistry serviceRegistry)
-
getGetter
public static org.hibernate.property.access.spi.Getter getGetter(Class cls, String propertyName, String accessorType, org.hibernate.service.ServiceRegistry serviceRegistry)
-
getSetter
public static org.hibernate.property.access.spi.Setter getSetter(Class cls, PropertyData propertyData, org.hibernate.service.ServiceRegistry serviceRegistry)
-
getSetter
public static org.hibernate.property.access.spi.Setter getSetter(Class cls, String propertyName, String accessorType, org.hibernate.service.ServiceRegistry serviceRegistry)
-
getField
public static Field getField(Class cls, PropertyData propertyData)
-
getType
public static Class<?> getType(Class cls, PropertyData propertyData, org.hibernate.service.ServiceRegistry serviceRegistry)
-
getProperty
public static XProperty getProperty(XClass clazz, String propertyName)
- Parameters:
clazz- Source class.propertyName- Property name.- Returns:
- Property object or
nullif none with expected name has been found.
-
getProperty
public static XProperty getProperty(XClass clazz, String propertyName, String accessType)
- Parameters:
clazz- Source class.propertyName- Property name.accessType- Expected access type. Legal values are field and property.- Returns:
- Property object or
nullif none with expected name and access type has been found.
-
loadClass
public static <T> Class<T> loadClass(String name, org.hibernate.boot.registry.classloading.spi.ClassLoaderService classLoaderService) throws org.hibernate.boot.registry.classloading.spi.ClassLoadingException
Locate class with a given name.- Parameters:
name- Fully qualified class name.classLoaderService- Class loading service. Passingnullis "allowed", but will result in TCCL usage.- Returns:
- The cass reference.
- Throws:
org.hibernate.boot.registry.classloading.spi.ClassLoadingException- Indicates the class could not be found.
-
-