public final class Service
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
classMap |
(package private) static java.util.Map<java.lang.String,java.util.List<java.lang.Object>> |
instanceMap |
Modifier | Constructor and Description |
---|---|
private |
Service() |
Modifier and Type | Method and Description |
---|---|
private static java.lang.ClassLoader |
getClassLoader(java.lang.Class<?> cls) |
private static java.util.List<java.lang.String> |
getProviderNames(java.lang.Class<?> cls) |
private static java.util.List<java.lang.String> |
getProviderNames(java.lang.Class<?> cls,
java.lang.ClassLoader cl) |
private static java.lang.String |
getServiceFilename(java.lang.Class<?> cls) |
static java.util.Iterator<java.lang.String> |
providerNames(java.lang.Class<?> cls)
Returns an iterator where each element should be the name
of a class that implements the
interface (or subclass the baseclass) described by cls.
|
static java.util.Iterator<java.lang.Object> |
providers(java.lang.Class<?> cls)
Returns an iterator where each element should implement the
interface (or subclass the baseclass) described by cls.
|
static java.util.Iterator<?> |
providers(java.lang.Class<?> cls,
boolean returnInstances)
Deprecated.
use the type-safe methods providers(Class) or providerNames(Class) instead.
|
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> classMap
static java.util.Map<java.lang.String,java.util.List<java.lang.Object>> instanceMap
public static java.util.Iterator<java.lang.Object> providers(java.lang.Class<?> cls)
cls
- The class/interface to search for providers of.public static java.util.Iterator<java.lang.String> providerNames(java.lang.Class<?> cls)
cls
- The class/interface to search for providers of.public static java.util.Iterator<?> providers(java.lang.Class<?> cls, boolean returnInstances)
cls
- The class/interface to search for providers of.returnInstances
- true if the iterator should return instances rather than class names.private static java.util.List<java.lang.String> getProviderNames(java.lang.Class<?> cls)
private static java.util.List<java.lang.String> getProviderNames(java.lang.Class<?> cls, java.lang.ClassLoader cl)
private static java.lang.ClassLoader getClassLoader(java.lang.Class<?> cls)
private static java.lang.String getServiceFilename(java.lang.Class<?> cls)