T
- The type of the object upon which the assignment code is to be
invokedU
- The type of the value that is to be assigned@FunctionalInterface public interface AssignmentInvoker<T,U>
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 BiConsumer
save the exceptions thrown, which is the reason for its existence.
Modifier and Type | Method and Description |
---|---|
void |
invoke(T object,
U value)
Invoke the code to assign a value to a field.
|
void invoke(T object, U value) throws IllegalAccessException, InvocationTargetException
object
- The object upon which the assignment method should be
invokedvalue
- The value to assign to a member variable of the given
objectIllegalAccessException
- If assignment causes a problemInvocationTargetException
- If assignment causes a problemCopyright © 2005–2023. All rights reserved.