Interface Reference<T>
- Type Parameters:
T- the type of the value
- All Known Subinterfaces:
TypedKey<T>
- All Known Implementing Classes:
Reference.Inline
A value of a registry, given either by the key it is registered under or inline.
A TypedKey is a reference, so the generated keys can be passed as they are.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA value given inline, not registered. -
Method Summary
-
Method Details
-
inline
Returns a reference to a value that is not registered.- Type Parameters:
T- the type of the value- Parameters:
value- the value- Returns:
- a reference to a value that is not registered
- Since:
- 0.1.0
-
resolve
Gets the value, looking it up inregistryif this is a key.- Parameters:
registry- the registry the value belongs to- Returns:
- the value
- Throws:
NoSuchElementException- if nothing is registered under the key- Since:
- 0.1.0
-