public interface Registry
Registry objects must be threadsafe.
| Modifier and Type | Method and Description |
|---|---|
<O> O |
get(Class<O> type)
Provides an object of the specified type, or throws an exception if no object of that type is available.
|
<O> List<O> |
getAll(Class<O> type) |
<O> O |
maybeGet(Class<O> type)
Does the same thing as
get(Class), except returns null instead of throwing an exception. |
<O> O get(Class<O> type) throws NotInRegistryException
O - The type of the object to providetype - The type of the object to provideNotInRegistryException - If no object of this type can be returned@Nullable <O> O maybeGet(Class<O> type)
get(Class), except returns null instead of throwing an exception.O - The type of the object to providetype - The type of the object to provide