mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
17 lines
468 B
Java
17 lines
468 B
Java
// void method()
|
|
// String method(String)
|
|
// String method(String, String[])
|
|
import java.lang.invoke.*;
|
|
|
|
class Main {
|
|
void foo() throws Exception {
|
|
MethodHandles.Lookup l = MethodHandles.lookup();
|
|
l.findStatic(Test.class, "method", <caret>MethodType.methodType(void.class, void.class));
|
|
}
|
|
}
|
|
|
|
class Test {
|
|
public static void method() {}
|
|
public static String method(String a) {return a;}
|
|
public static String method(String a, String... b) {return a;}
|
|
} |