类 ClassLoaderServiceImpl
- java.lang.Object
-
- org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl
-
- 所有已实现的接口:
Serializable,ClassLoaderService,Service,Stoppable
public class ClassLoaderServiceImpl extends Object implements ClassLoaderService
Standard implementation of the service for interacting with class loaders- 作者:
- Steve Ebersole, Sanne Grinovero
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 org.hibernate.boot.registry.classloading.spi.ClassLoaderService
ClassLoaderService.Work<T>
-
-
构造器概要
构造器 构造器 说明 ClassLoaderServiceImpl()Constructs a ClassLoaderServiceImpl with standard set-upClassLoaderServiceImpl(ClassLoader classLoader)Constructs a ClassLoaderServiceImpl with the given ClassLoaderClassLoaderServiceImpl(Collection<ClassLoader> providedClassLoaders, TcclLookupPrecedence lookupPrecedence)Constructs a ClassLoaderServiceImpl with the given ClassLoader instances
-
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 <T> Class<T>classForName(String className)Locate a class by name.static ClassLoaderServiceImplfromConfigSettings(Map configValues)已过时。No longer used/supported!<T> TgenerateProxy(InvocationHandler handler, Class... interfaces)<S> Collection<S>loadJavaServices(Class<S> serviceContract)Discovers and instantiates implementations of the named service contract.URLlocateResource(String name)Locate a resource by name (classpath lookup).List<URL>locateResources(String name)Locate a series of resource by name (classpath lookup).InputStreamlocateResourceStream(String name)Locate a resource by name (classpath lookup) and gets its stream.voidstop()Stop phase notification<T> TworkWithClassLoader(ClassLoaderService.Work<T> work)
-
-
-
构造器详细资料
-
ClassLoaderServiceImpl
public ClassLoaderServiceImpl()
Constructs a ClassLoaderServiceImpl with standard set-up
-
ClassLoaderServiceImpl
public ClassLoaderServiceImpl(ClassLoader classLoader)
Constructs a ClassLoaderServiceImpl with the given ClassLoader- 参数:
classLoader- The ClassLoader to use
-
ClassLoaderServiceImpl
public ClassLoaderServiceImpl(Collection<ClassLoader> providedClassLoaders, TcclLookupPrecedence lookupPrecedence)
Constructs a ClassLoaderServiceImpl with the given ClassLoader instances- 参数:
providedClassLoaders- The ClassLoader instances to uselookupPrecedence- The lookup precedence of the thread contextClassLoader
-
-
方法详细资料
-
fromConfigSettings
@Deprecated public static ClassLoaderServiceImpl fromConfigSettings(Map configValues)
已过时。No longer used/supported!No longer used/supported!- 参数:
configValues- The config values- 返回:
- The built service
-
classForName
public <T> Class<T> classForName(String className)
从接口复制的说明:ClassLoaderServiceLocate a class by name.- 指定者:
classForName在接口中ClassLoaderService- 类型参数:
T- The returned class type.- 参数:
className- The name of the class to locate- 返回:
- The class reference
-
locateResource
public URL locateResource(String name)
从接口复制的说明:ClassLoaderServiceLocate a resource by name (classpath lookup).- 指定者:
locateResource在接口中ClassLoaderService- 参数:
name- The resource name.- 返回:
- The located URL; may return
nullto indicate the resource was not found
-
locateResourceStream
public InputStream locateResourceStream(String name)
从接口复制的说明:ClassLoaderServiceLocate a resource by name (classpath lookup) and gets its stream.- 指定者:
locateResourceStream在接口中ClassLoaderService- 参数:
name- The resource name.- 返回:
- The stream of the located resource; may return
nullto indicate the resource was not found
-
locateResources
public List<URL> locateResources(String name)
从接口复制的说明:ClassLoaderServiceLocate a series of resource by name (classpath lookup).- 指定者:
locateResources在接口中ClassLoaderService- 参数:
name- The resource name.- 返回:
- The list of URL matching; may return
nullto indicate the resource was not found
-
loadJavaServices
public <S> Collection<S> loadJavaServices(Class<S> serviceContract)
从接口复制的说明:ClassLoaderServiceDiscovers and instantiates implementations of the named service contract. NOTE : the terms service here is used differently thanService. Instead here we are talking about services as defined byServiceLoader.- 指定者:
loadJavaServices在接口中ClassLoaderService- 类型参数:
S- The type of the service contract- 参数:
serviceContract- The java type defining the service contract- 返回:
- The ordered set of discovered services.
-
generateProxy
public <T> T generateProxy(InvocationHandler handler, Class... interfaces)
- 指定者:
generateProxy在接口中ClassLoaderService
-
workWithClassLoader
public <T> T workWithClassLoader(ClassLoaderService.Work<T> work)
- 指定者:
workWithClassLoader在接口中ClassLoaderService
-
-