Class SimpleClassLoading

java.lang.Object
org.hibernate.models.internal.SimpleClassLoading
All Implemented Interfaces:
Serializable, ClassLoading

public class SimpleClassLoading extends Object implements ClassLoading, Serializable
ClassLoading which simply uses our ClassLoader directly
See Also:
  • Field Details

  • Constructor Details

    • SimpleClassLoading

      public SimpleClassLoading()
  • Method Details

    • classForName

      public <T> Class<T> classForName(String name)
      Description copied from interface: ClassLoading
      Obtain a Class reference by name
      Specified by:
      classForName in interface ClassLoading
      Parameters:
      name - The name of the class
      Returns:
      The Class object with the given name
    • findClassForName

      public <T> Class<T> findClassForName(String name)
      Description copied from interface: ClassLoading
      Like ClassLoading.classForName(String), except here we simply return null if there is not a matching class. This is often useful, e.g., when looking for a package-info.
      Specified by:
      findClassForName in interface ClassLoading
    • locateResource

      public URL locateResource(String resourceName)
      Description copied from interface: ClassLoading
      Locate a resource by name
      Specified by:
      locateResource in interface ClassLoading
      Parameters:
      resourceName - The name of the resource to resolve
      Returns:
      The located resource; may return null to indicate the resource was not found
    • loadJavaServices

      public <S> Collection<S> loadJavaServices(Class<S> serviceType)
      Description copied from interface: ClassLoading
      Discovers and instantiates implementations of the given Java service contract.
      Specified by:
      loadJavaServices in interface ClassLoading
      Type Parameters:
      S - The type of the service contract
      Parameters:
      serviceType - The java type defining the service contract
      Returns:
      The ordered set of discovered services.