T
- The type of the object from which the value should be retrievedR
- The type of the return value@FunctionalInterface public interface AccessorInvoker<T,R>
The field must be part of the code created for this functional interface, as there is no way to pass the field in during invocation.
This interface is almost identical to Function
save the exceptions thrown, which is the reason for its existence.
Modifier and Type | Method and Description |
---|---|
R |
invoke(T object)
Invoke the code to retrieve a value from a field.
|
R invoke(T object) throws IllegalAccessException, InvocationTargetException
object
- The object from which the value of the field should be
retrievedIllegalAccessException
- If retrieval causes a problemInvocationTargetException
- If retrieval causes a problemCopyright © 2005–2023. All rights reserved.