public class DelegatingClassLoaderService extends Object implements ClassLoaderService
ClassLoaderService
. If class,
resource or service loading fails in ORM class loader, the current class loader is checked.Constructor and Description |
---|
DelegatingClassLoaderService(ClassLoaderService hibernateClassLoaderService) |
Modifier and Type | Method and Description |
---|---|
<T> Class<T> |
classForName(String className)
Locate a class by name.
|
<T> LinkedHashSet<T> |
loadJavaServices(Class<T> serviceContract)
Discovers and instantiates implementations of the named service contract.
|
URL |
locateResource(String name)
Locate a resource by name (classpath lookup).
|
InputStream |
locateResourceStream(String name)
Locate a resource by name (classpath lookup) and gets its stream.
|
public DelegatingClassLoaderService(ClassLoaderService hibernateClassLoaderService)
public <T> Class<T> classForName(String className)
ClassLoaderService
classForName
in interface ClassLoaderService
T
- The returned class type.className
- The name of the class to locatepublic URL locateResource(String name)
ClassLoaderService
locateResource
in interface ClassLoaderService
name
- The resource name.null
to indicate the resource was not foundpublic InputStream locateResourceStream(String name)
ClassLoaderService
locateResourceStream
in interface ClassLoaderService
name
- The resource name.null
to indicate the resource was not foundpublic <T> LinkedHashSet<T> loadJavaServices(Class<T> serviceContract)
ClassLoaderService
Service
. Instead here we are talking about
services as defined by ServiceLoader
.loadJavaServices
in interface ClassLoaderService
T
- The type of the service contractserviceContract
- The java type defining the service contractCopyright © 2006-2015 Red Hat, Inc. All Rights Reserved