| Modifier and Type | Method and Description |
|---|---|
<T> Class<T> |
classForName(String className)
Locate a class by name.
|
<T> Iterable<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.
|
<T> Class<T> classForName(String className)
T - The returned class type.className - The name of the class to locateClassLoadingException - Indicates the class could not be foundURL locateResource(String name)
name - The resource name.null to indicate the resource was not foundInputStream locateResourceStream(String name)
name - The resource name.null to indicate the resource was not found<T> Iterable<T> loadJavaServices(Class<T> serviceContract)
NOTE : the terms service here is used differently than Service. Instead here we are talking about
services as defined by ServiceLoader.
T - The type of the service contractserviceContract - The java type defining the service contractCopyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.