Skip to content

Commit

Permalink
oops this project is java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Aug 17, 2024
1 parent 1f9cdf5 commit 996eba6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/me/mrnavastar/r/R.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ public R call(String name, Object... args) {
}

public Class<?>[] generics() {
if (clazz.getGenericSuperclass() instanceof ParameterizedType type) {
return Arrays.stream(type.getActualTypeArguments()).map(t -> {
Type generic = clazz.getGenericSuperclass();
if (generic instanceof ParameterizedType) {
return Arrays.stream(((ParameterizedType) generic).getActualTypeArguments()).map(t -> {
try {
return Class.forName(t.getTypeName());
} catch (ClassNotFoundException e) {
Expand Down

0 comments on commit 996eba6

Please sign in to comment.