mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 10:30:42 +00:00
default impl of getCheckedRegistry
This commit is contained in:
@@ -21,9 +21,11 @@ public interface RegistryHolder {
|
||||
return getCheckedRegistry((Type) clazz);
|
||||
}
|
||||
|
||||
default <T> CheckedRegistry<T> getCheckedRegistry(TypeToken<T> type) {
|
||||
default <T> CheckedRegistry<T> getCheckedRegistry(TypeToken<T> type) throws IllegalStateException {
|
||||
return getCheckedRegistry(type.getType());
|
||||
}
|
||||
|
||||
<T> CheckedRegistry<T> getCheckedRegistry(Type type) throws IllegalStateException;
|
||||
default <T> CheckedRegistry<T> getCheckedRegistry(Type type) throws IllegalStateException {
|
||||
throw new IllegalStateException("Cannot get checked registry.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user