Fix an error with TinyProtocol reflection
Fixes aadnk#103
Dieser Commit ist enthalten in:
Ursprung
0e6a7a39a0
Commit
f561057311
@ -215,7 +215,9 @@ public final class Reflection {
|
|||||||
*/
|
*/
|
||||||
public static MethodInvoker getTypedMethod(Class<?> clazz, String methodName, Class<?> returnType, Class<?>... params) {
|
public static MethodInvoker getTypedMethod(Class<?> clazz, String methodName, Class<?> returnType, Class<?>... params) {
|
||||||
for (final Method method : clazz.getDeclaredMethods()) {
|
for (final Method method : clazz.getDeclaredMethods()) {
|
||||||
if ((methodName == null || method.getName().equals(methodName)) && (returnType == null) || method.getReturnType().equals(returnType) && Arrays.equals(method.getParameterTypes(), params)) {
|
if ((methodName == null || method.getName().equals(methodName))
|
||||||
|
&& (returnType == null || method.getReturnType().equals(returnType))
|
||||||
|
&& Arrays.equals(method.getParameterTypes(), params)) {
|
||||||
method.setAccessible(true);
|
method.setAccessible(true);
|
||||||
|
|
||||||
return new MethodInvoker() {
|
return new MethodInvoker() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren