mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
17 lines
438 B
Java
17 lines
438 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.findVirtual(Test.class, "method", <caret>MethodType.methodType(String.class));
|
|
}
|
|
}
|
|
|
|
class Test {
|
|
public String method(String a, String... b) {return a;}
|
|
public void method() {}
|
|
public String method(String a) {return a;}
|
|
} |