public interface ClassLoaderService extends Service
Modifier and Type | Method and Description |
---|---|
<T> java.lang.Class<T> |
classForName(java.lang.String className)
Locate a class by name
|
<S> java.util.LinkedHashSet<S> |
loadJavaServices(java.lang.Class<S> serviceContract)
Discovers and instantiates implementations of the named service contract.
|
java.net.URL |
locateResource(java.lang.String name)
Locate a resource by name (classpath lookup)
|
java.util.List<java.net.URL> |
locateResources(java.lang.String name)
Locate a series of resource by name (classpath lookup)
|
java.io.InputStream |
locateResourceStream(java.lang.String name)
Locate a resource by name (classpath lookup) and gets its stream
|
<T> java.lang.Class<T> classForName(java.lang.String className)
className
- The name of the class to locateClassLoadingException
- Indicates the class could not be foundjava.net.URL locateResource(java.lang.String name)
name
- The resource name.null
to indicate the resource was not foundjava.io.InputStream locateResourceStream(java.lang.String name)
name
- The resource name.null
to indicate the resource was not foundjava.util.List<java.net.URL> locateResources(java.lang.String name)
name
- The resource name.null
to indicate the resource was not found<S> java.util.LinkedHashSet<S> loadJavaServices(java.lang.Class<S> serviceContract)
Service
. Instead here we are talking about
services as defined by ServiceLoader
.S
- The type of the service contractserviceContract
- The java type defining the service contractCopyright © 2001-2012 Red Hat, Inc. All Rights Reserved.