public interface RegistrySpec
RegistryBuilder| Modifier and Type | Method and Description |
|---|---|
<O> RegistrySpec |
add(Class<? super O> type,
O object)
Adds a registry entry that is available by the given type.
|
<O> RegistrySpec |
add(Class<O> type,
Factory<? extends O> factory)
Adds a lazily created entry to the registry.
|
RegistrySpec |
add(Object object)
Adds a registry entry.
|
<O> RegistrySpec add(Class<? super O> type, O object)
O - the public type of the registry entrytype - the public type of the registry entryobject - the actual registry entryRegistrySpec add(Object object)
object - the object to add to the registry<O> RegistrySpec add(Class<O> type, Factory<? extends O> factory)
The factory will be invoked exactly once, when a query is made to the registry of a compatible type of the given type.
O - the public type of the registry entrytype - the public type of the registry entryfactory - the factory for creating the object when needed