java.lang.invoke.MethodHandles.Lookup that masks
checked exceptions. It is useful in those cases when you're looking up
methods within your own codebase (therefore it is an error if they are not
present).
| Modifier and Type | Field and Description |
|---|---|
| private final MethodHandles. | |
| public static final Lookup | PUBLIC
A canonical Lookup object that wraps |
| Access | Constructor and Description |
|---|---|
| public | Lookup(final MethodHandles.
the lookupjava. it delegates to.Creates a new instance, bound to an instance of
|
| Modifier and Type | Method and Description |
|---|---|
| public MethodHandle | Returns: the unreflected field getter handle.the class declaring the field refc, final String the name of the field name, final Class<?> the type of the field type)Performs a |
| public static MethodHandle | Returns: the method handle for the methodthe lookup for the class lookup,the name of the method name, final Class<?> the return type of the method rtype, final Class<?>... the parameter types of the method ptypes)Given a lookup, finds using |
| public MethodHandle | Returns: the method handle for the methodthe name of the method name, final Class<?> the return type of the method rtype, final Class<?>... the parameter types of the method ptypes)Finds using |
| public static MethodHandle | Returns: the method handle for the methodthe lookup for the class lookup,the name of the method name, final Class<?> the return type of the method rtype, final Class<?>... the parameter types of the method ptypes)Given a lookup, finds using |
| public MethodHandle | Returns: the method handle for the methodthe name of the method name, final Class<?> the return type of the method rtype, final Class<?>... the parameter types of the method ptypes)Finds using |
| public MethodHandle | Returns: a method handle for the methodclass declaring the method declaringClass, final String the name of the method name, final MethodType the type of the method type)Performs a |
| public MethodHandle | Returns: a method handle for the methodclass declaring the method declaringClass, final String the name of the method name, final MethodType the type of the method type)Performs a |
| public MethodHandle | Returns: a method handle for the methodclass declaring the method declaringClass, final String the name of the method name, final MethodType the type of the method type)Performs a |
| private static String | |
| public MethodHandle | Returns: the unreflected method handle.the method to unreflect m)Performs a |
| public static MethodHandle | Returns: the unreflected method handle.the lookup used to unreflect lookup,the method to unreflect m)Performs a |
| public MethodHandle | Returns: the unreflected constructor handle.the constructor to unreflect c)Performs a |
| public static MethodHandle | Returns: the unreflected constructor handle.the lookup used to unreflect lookup,the constructor to unreflect c)Performs a |
| public MethodHandle | Returns: the unreflected field getter handle.the field for which a getter is unreflected f)Performs a |
| public MethodHandle | Returns: the unreflected field setter handle.the field for which a setter is unreflected f)Performs a |
| lookup | back to summary |
|---|---|
| private final MethodHandles. | |
| PUBLIC | back to summary |
|---|---|
| public static final Lookup PUBLIC A canonical Lookup object that wraps | |
| Lookup | back to summary |
|---|---|
| public Lookup(final MethodHandles. Creates a new instance, bound to an instance of
| |
| findGetter | back to summary |
|---|---|
| public MethodHandle findGetter(final Class<?> refc, final String name, final Class<?> type) Performs a
| |
| findOwnSpecial | back to summary |
|---|---|
| public static MethodHandle findOwnSpecial(final MethodHandles. Given a lookup, finds using
| |
| findOwnSpecial | back to summary |
|---|---|
| public MethodHandle findOwnSpecial(final String name, final Class<?> rtype, final Class<?>... ptypes) Finds using
| |
| findOwnStatic | back to summary |
|---|---|
| public static MethodHandle findOwnStatic(final MethodHandles. Given a lookup, finds using
| |
| findOwnStatic | back to summary |
|---|---|
| public MethodHandle findOwnStatic(final String name, final Class<?> rtype, final Class<?>... ptypes) Finds using
| |
| findSpecial | back to summary |
|---|---|
| public MethodHandle findSpecial(final Class<?> declaringClass, final String name, final MethodType type) Performs a
| |
| findStatic | back to summary |
|---|---|
| public MethodHandle findStatic(final Class<?> declaringClass, final String name, final MethodType type) Performs a
| |
| findVirtual | back to summary |
|---|---|
| public MethodHandle findVirtual(final Class<?> declaringClass, final String name, final MethodType type) Performs a
| |
| methodDescription | back to summary |
|---|---|
| private static String methodDescription(final Class<?> declaringClass, final String name, final MethodType type) | |
| unreflect | back to summary |
|---|---|
| public MethodHandle unreflect(final Method m) Performs a
| |
| unreflect | back to summary |
|---|---|
| public static MethodHandle unreflect(final MethodHandles. Performs a
| |
| unreflectConstructor | back to summary |
|---|---|
| public MethodHandle unreflectConstructor(final Constructor<?> c) Performs a
| |
| unreflectConstructor | back to summary |
|---|---|
| public static MethodHandle unreflectConstructor(final MethodHandles. Performs a
| |
| unreflectGetter | back to summary |
|---|---|
| public MethodHandle unreflectGetter(final Field f) Performs a
| |
| unreflectSetter | back to summary |
|---|---|
| public MethodHandle unreflectSetter(final Field f) Performs a
| |