We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 912d024 commit be36a1dCopy full SHA for be36a1d
core/src/main/java/dev/velix/imperat/util/TypeCapturer.java
@@ -34,21 +34,4 @@ protected Type extractType(int index) {
34
throw new IllegalStateException("Superclass is not parameterized: " + genericSuperClass);
35
}
36
37
- /**
38
- * Attempts to cast the type argument to a Class object.
39
- */
40
- @SuppressWarnings("unchecked")
41
- protected <T> Class<T> extractTypeClass(int index) {
42
- Type type = extractType(index);
43
-
44
- if (type instanceof Class<?> cls) {
45
- return (Class<T>) cls;
46
- }
47
48
- if (type instanceof ParameterizedType pt && pt.getRawType() instanceof Class<?> raw) {
49
- return (Class<T>) raw;
50
51
52
- throw new IllegalStateException("Type at index " + index + " is not a Class: " + type);
53
54
0 commit comments