Package one.nio.util
Class MethodHandlesReflection
java.lang.Object
one.nio.util.MethodHandlesReflection
Allows to lookup information about available Class' methods using java.lang.invoke API,
when the standard getDeclaredMethods() fail with NoClassDefFoundError due to some missing class file.
All lookups are made recursively through parent classes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MethodHandleInfofindInstanceMethod(Class<?> cls, String name, MethodType type) static MethodHandleInfofindInstanceMethodOrThrow(Class<?> cls, String name, MethodType type) static MethodHandleInfofindStaticMethod(Class<?> cls, String name, MethodType type) static MethodHandleInfofindStaticMethodOrThrow(Class<?> cls, String name, MethodType type)
-
Field Details
-
privateLookup
-
-
Constructor Details
-
MethodHandlesReflection
public MethodHandlesReflection()
-
-
Method Details
-
findInstanceMethod
-
findInstanceMethodOrThrow
public static MethodHandleInfo findInstanceMethodOrThrow(Class<?> cls, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException -
findStaticMethod
-
findStaticMethodOrThrow
public static MethodHandleInfo findStaticMethodOrThrow(Class<?> cls, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException
-