public class DefaultClassLoaderService extends Object implements ClassLoaderService
ClassLoaderService using the old pre class loader service apporach of
attempting to load from the current and thread context class loaders.| Constructor and Description |
|---|
DefaultClassLoaderService()
Constructs a ClassLoaderServiceImpl with standard set-up
|
| Modifier and Type | Method and Description |
|---|---|
<T> Class<T> |
classForName(String className)
Locate a class by name.
|
<S> LinkedHashSet<S> |
loadJavaServices(Class<S> 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 DefaultClassLoaderService()
public <T> Class<T> classForName(String className)
ClassLoaderServiceclassForName in interface ClassLoaderServiceT - The returned class type.className - The name of the class to locatepublic URL locateResource(String name)
ClassLoaderServicelocateResource in interface ClassLoaderServicename - The resource name.null to indicate the resource was not foundpublic InputStream locateResourceStream(String name)
ClassLoaderServicelocateResourceStream in interface ClassLoaderServicename - The resource name.null to indicate the resource was not foundpublic <S> LinkedHashSet<S> loadJavaServices(Class<S> serviceContract)
ClassLoaderService
NOTE : the terms service here is used differently than Service. Instead here we are talking about
services as defined by ServiceLoader.
loadJavaServices in interface ClassLoaderServiceS - The type of the service contractserviceContract - The java type defining the service contractCopyright © 2006–2016 Hibernate. All rights reserved.