Interface ValueReadHandleFactory
-
public interface ValueReadHandleFactory
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description ValueReadHandle<?>createForField(Field field)ValueReadHandle<?>createForMethod(Method method)static ValueReadHandleFactoryusingJavaLangReflect()static ValueReadHandleFactoryusingMethodHandle(MethodHandles.Lookup lookup)
-
-
-
Method Detail
-
createForField
ValueReadHandle<?> createForField(Field field) throws IllegalAccessException
- Throws:
IllegalAccessException
-
createForMethod
ValueReadHandle<?> createForMethod(Method method) throws IllegalAccessException
- Throws:
IllegalAccessException
-
usingJavaLangReflect
static ValueReadHandleFactory usingJavaLangReflect()
- Returns:
- A factory producing value handles that rely on
java.lang.reflectto get the value of a field/method, i.eMethod.invoke(Object, Object...)andField.get(Object).
-
usingMethodHandle
static ValueReadHandleFactory usingMethodHandle(MethodHandles.Lookup lookup)
- Parameters:
lookup- A lookup with sufficient access rights to access all relevant fields and methods.- Returns:
- A factory producing value handles that rely on
MethodHandleto get the value of a field/method.
-
-