ArgumentsAccessor API.
Delegates conversion to DefaultArgumentConverter.
ArgumentsAccessor, DefaultArgumentConverter, org.junit.jupiter.params.ParameterizedTest
| Modifier and Type | Field and Description |
|---|---|
| private final @Nullable Object[] | |
| private final BiFunction | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private | DefaultArgumentsAccessor(BiFunction<@Nullable Object, Class<?>, @Nullable Object> converter, int invocationIndex, @Nullable Object... arguments)
|
| Modifier and Type | Method and Description |
|---|---|
| public static DefaultArgumentsAccessor | |
| public @Nullable Object | get(int index)
Implements org. Get the value of the argument at the given index as an |
| public <T> @Nullable T | get(int index, Class<T> requiredType)
Implements org. Get the value of the argument at the given index as an instance of the required type. |
| public @Nullable Boolean | getBoolean(int index)
Implements org. Get the value of the argument at the given index as a |
| public @Nullable Byte | getByte(int index)
Implements org. Get the value of the argument at the given index as a |
| public @Nullable Character | getCharacter(int index)
Implements org. Get the value of the argument at the given index as a |
| public @Nullable Double | getDouble(int index)
Implements org. Get the value of the argument at the given index as a |
| public @Nullable Float | getFloat(int index)
Implements org. Get the value of the argument at the given index as a |
| public @Nullable Integer | getInteger(int index)
Implements org. Get the value of the argument at the given index as a |
| public int | getInvocationIndex()
Implements org. Get the index of the current test invocation. |
| public @Nullable Long | getLong(int index)
Implements org. Get the value of the argument at the given index as a |
| public @Nullable Short | getShort(int index)
Implements org. Get the value of the argument at the given index as a |
| public @Nullable String | getString(int index)
Implements org. Get the value of the argument at the given index as a |
| public int | size()
Implements org. Get the number of arguments in this accessor. |
| public @Nullable Object[] | toArray()
Implements org. Get all arguments in this accessor as an array. |
| public List | toList()
Implements org. Get all arguments in this accessor as an immutable list. |
| arguments | back to summary |
|---|---|
| private final @Nullable Object[] arguments | |
| converter | back to summary |
|---|---|
| private final BiFunction<@Nullable Object, Class<?>, @Nullable Object> converter | |
| invocationIndex | back to summary |
|---|---|
| private final int invocationIndex | |
| DefaultArgumentsAccessor | back to summary |
|---|---|
| private DefaultArgumentsAccessor(BiFunction<@Nullable Object, Class<?>, @Nullable Object> converter, int invocationIndex, @Nullable Object... arguments) | |
| create | back to summary |
|---|---|
| public static DefaultArgumentsAccessor create(int invocationIndex, ClassLoader classLoader, @Nullable Object[] arguments) | |
| get | back to summary |
|---|---|
| public @Nullable Object get(int index) Implements org. Doc from org. Get the value of the argument at the given index as an
| |
| get | back to summary |
|---|---|
| public <T> @Nullable T get(int index, Class<T> requiredType) Implements org. Doc from org. Get the value of the argument at the given index as an instance of the required type.
| |
| getBoolean | back to summary |
|---|---|
| public @Nullable Boolean getBoolean(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getByte | back to summary |
|---|---|
| public @Nullable Byte getByte(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getCharacter | back to summary |
|---|---|
| public @Nullable Character getCharacter(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getDouble | back to summary |
|---|---|
| public @Nullable Double getDouble(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getFloat | back to summary |
|---|---|
| public @Nullable Float getFloat(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getInteger | back to summary |
|---|---|
| public @Nullable Integer getInteger(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getInvocationIndex | back to summary |
|---|---|
| public int getInvocationIndex() Implements org. Doc from org. Get the index of the current test invocation.
| |
| getLong | back to summary |
|---|---|
| public @Nullable Long getLong(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getShort | back to summary |
|---|---|
| public @Nullable Short getShort(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| getString | back to summary |
|---|---|
| public @Nullable String getString(int index) Implements org. Doc from org. Get the value of the argument at the given index as a
| |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. Get the number of arguments in this accessor.
| |
| toArray | back to summary |
|---|---|
| public @Nullable Object[] toArray() Implements org. Doc from org. Get all arguments in this accessor as an array.
| |
| toList | back to summary |
|---|---|
| public List Implements org. Doc from org. Get all arguments in this accessor as an immutable list.
| |