Top Description Methods
com.opencsv.bean.function

public Interface AccessorInvoker<T, R>

Annotations
@FunctionalInterface
Type Parameters
<T>
The type of the object from which the value should be retrieved
<R>
The type of the return value
Imports
java.lang.reflect.InvocationTargetException

Functional interface for accessing a value from a field.

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 java.util.function.Function save the exceptions thrown, which is the reason for its existence.

Author
Andrew Rucker Jones
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public R

Returns:

The value of the field from the given object
invoke
(T
The object from which the value of the field should be retrieved
object
)

Invoke the code to retrieve a value from a field.

Method Detail

invokeback to summary
public R invoke(T object) throws IllegalAccessException, InvocationTargetException

Invoke the code to retrieve a value from a field.

Parameters
object:T

The object from which the value of the field should be retrieved

Returns:R

The value of the field from the given object

Exceptions
IllegalAccessException:
If retrieval causes a problem
InvocationTargetException:
If retrieval causes a problem