Some methods take no receiver argument. In these cases, the receiver is the lookup class.
The methods will throw an InternalError if the lookup fails.
Here is an example of how one of these methods could be used:
lang=java
static MethodHandle BAR_HANDLE =
MhUtil.findVirtual(MethodHandles.lookup(),
Foo.class,"bar",MethodType.methodType(int.class));
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static MethodHandle | |
| public static MethodHandle | |
| public static VarHandle | |
| public static VarHandle | |
| public static MethodHandle | |
| public static MethodHandle |
| MhUtil | back to summary |
|---|---|
| private MhUtil() | |
| findStatic | back to summary |
|---|---|
| public static MethodHandle findStatic(MethodHandles. | |
| findStatic | back to summary |
|---|---|
| public static MethodHandle findStatic(MethodHandles. | |
| findVarHandle | back to summary |
|---|---|
| public static VarHandle findVarHandle(MethodHandles. | |
| findVarHandle | back to summary |
|---|---|
| public static VarHandle findVarHandle(MethodHandles. | |
| findVirtual | back to summary |
|---|---|
| public static MethodHandle findVirtual(MethodHandles. | |
| findVirtual | back to summary |
|---|---|
| public static MethodHandle findVirtual(MethodHandles. | |