Interface ValueHandleFactory
- All Known Subinterfaces:
ValueReadHandleFactory
public interface ValueHandleFactory
-
Method Summary
Modifier and TypeMethodDescription<T> ValueCreateHandle<T>createForConstructor(Constructor<T> constructor) createForField(Field field) createForMethod(Method method) static ValueHandleFactorystatic ValueHandleFactory
-
Method Details
-
createForConstructor
<T> ValueCreateHandle<T> createForConstructor(Constructor<T> constructor) throws IllegalAccessException - Throws:
IllegalAccessException
-
createForField
- Throws:
IllegalAccessException
-
createForMethod
- Throws:
IllegalAccessException
-
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
- 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.
-