Skip to content

Commit be36a1d

Browse files
authored
Remove unused method in TypeCapturer
1 parent 912d024 commit be36a1d

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

core/src/main/java/dev/velix/imperat/util/TypeCapturer.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,4 @@ protected Type extractType(int index) {
3434
throw new IllegalStateException("Superclass is not parameterized: " + genericSuperClass);
3535
}
3636

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-
}
5437
}

0 commit comments

Comments
 (0)