Modifier and Type | Field and Description |
---|---|
protected static Services |
instance
A global instance.
|
Modifier | Constructor and Description |
---|---|
protected |
Services()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static <A extends Service> |
createService(Class<? super A> specClass)
Creates an implementing class instance from the given specification superclass.
|
static <A extends Service> |
registerService(Class<A> specClass,
Class<? extends A> implClass)
Registers an implementing class with the given specification superclass.
|
protected static final Services instance
public static <A extends Service> A createService(Class<? super A> specClass)
A
- the implementing class type, which is a lower bound on the superclass type.specClass
- the specification superclass.public static <A extends Service> void registerService(Class<A> specClass, Class<? extends A> implClass)
A
- the superclass type, which is an upper bound on the implementation class type.specClass
- the specification superclass.implClass
- the implementing class.