mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 05:50:08 +00:00
default impl of getCheckedRegistry
This commit is contained in:
1 parent
cd208cbd18
commit
d10e2050cb
1 file changed
+4
-2
@@ -21,9 +21,11 @@ public interface RegistryHolder {
|
|||||||
return getCheckedRegistry((Type) clazz);
|
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());
|
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