From 11b0828a07d014da9da4cdf8a7936771f4502881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C13228110660=E2=80=9D?= <7728513+ironpan3160899@user.noreply.gitee.com> Date: Tue, 22 Feb 2022 15:43:54 +0800 Subject: [PATCH] add support searching default methods since Java 8 --- src/com/esotericsoftware/reflectasm/MethodAccess.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/esotericsoftware/reflectasm/MethodAccess.java b/src/com/esotericsoftware/reflectasm/MethodAccess.java index 18a18b3..6bfa7aa 100644 --- a/src/com/esotericsoftware/reflectasm/MethodAccess.java +++ b/src/com/esotericsoftware/reflectasm/MethodAccess.java @@ -90,6 +90,9 @@ static public MethodAccess get (Class type) { Class nextClass = type; while (nextClass != Object.class) { addDeclaredMethodsToList(nextClass, methods); + for (Class nextInterface : nextClass.getInterfaces()) { + addDeclaredMethodsToList(nextInterface, methods); + } nextClass = nextClass.getSuperclass(); } } else