final class LookupHelper extends Object
MethodHandles.Lookup
in order to invoke default methods and other magic stuff.Modifier and Type | Field and Description |
---|---|
static LookupHelper |
INSTANCE |
private Constructor<MethodHandles.Lookup> |
lookupConstructor |
Modifier | Constructor and Description |
---|---|
private |
LookupHelper()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
invokeDefaultMethod(Object instance,
Method method,
Object... args) |
MethodHandles.Lookup |
newLookup(Class<?> type) |
MethodHandle |
newMethodHandle(Method method) |
public static final LookupHelper INSTANCE
private final Constructor<MethodHandles.Lookup> lookupConstructor
public MethodHandles.Lookup newLookup(Class<?> type)
type
- the Class
to create the MethodHandles.Lookup
for.MethodHandles.Lookup
for the given type
.public MethodHandle newMethodHandle(Method method)
method
- the Method
.MethodHandle
.Copyright © 2001–2016 mmm-Team. All rights reserved.