Class ReflectionTools


  • public abstract class ReflectionTools
    extends Object
    • Constructor Detail

      • ReflectionTools

        public ReflectionTools()
    • Method Detail

      • getProperty

        public static org.hibernate.annotations.common.reflection.XProperty getProperty​(org.hibernate.annotations.common.reflection.XClass clazz,
                                                                                        String propertyName)
        Parameters:
        clazz - Source class.
        propertyName - Property name.
        Returns:
        Property object or null if none with expected name has been found.
      • getProperty

        public static org.hibernate.annotations.common.reflection.XProperty getProperty​(org.hibernate.annotations.common.reflection.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 null if none with expected name and access type has been found.
      • loadClass

        public static <T> Class<T> loadClass​(String name,
                                             ClassLoaderService classLoaderService)
                                      throws ClassLoadingException
        Locate class with a given name.
        Parameters:
        name - Fully qualified class name.
        classLoaderService - Class loading service. Passing null is "allowed", but will result in TCCL usage.
        Returns:
        The cass reference.
        Throws:
        ClassLoadingException - Indicates the class could not be found.