Top Description Fields Constructors Methods
org.junit.jupiter.params.aggregator

public Class DefaultArgumentsAccessor

extends Object
implements ArgumentsAccessor
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.params.aggregator.ArgumentsAccessor
Annotations
@API
status:INTERNAL
since:5.2
Static Imports
org.apiguardian.api.API.Status.INTERNAL

Default implementation of the ArgumentsAccessor API.

Delegates conversion to DefaultArgumentConverter.

Since
5.2
See Also
ArgumentsAccessor, DefaultArgumentConverter, org.junit.jupiter.params.ParameterizedTest

Field Summary

Modifier and TypeField and Description
private final @Nullable Object[]
private final BiFunction<@Nullable Object, Class<?>, @Nullable Object>
private final int

Constructor Summary

AccessConstructor and Description
private
DefaultArgumentsAccessor(BiFunction<@Nullable Object, Class<?>, @Nullable Object> converter, int invocationIndex, @Nullable Object... arguments)

Method Summary

Modifier and TypeMethod and Description
public static DefaultArgumentsAccessor
create(int invocationIndex, ClassLoader classLoader, @Nullable Object[] arguments)

public @Nullable Object
get(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.get.

Get the value of the argument at the given index as an Object.

public <T> @Nullable T
get(int index, Class<T> requiredType)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.get.

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.junit.jupiter.params.aggregator.ArgumentsAccessor.getBoolean.

Get the value of the argument at the given index as a Boolean, performing automatic type conversion as necessary.

public @Nullable Byte
getByte(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getByte.

Get the value of the argument at the given index as a Byte, performing automatic type conversion as necessary.

public @Nullable Character
getCharacter(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getCharacter.

Get the value of the argument at the given index as a Character, performing automatic type conversion as necessary.

public @Nullable Double
getDouble(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getDouble.

Get the value of the argument at the given index as a Double, performing automatic type conversion as necessary.

public @Nullable Float
getFloat(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getFloat.

Get the value of the argument at the given index as a Float, performing automatic type conversion as necessary.

public @Nullable Integer
getInteger(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getInteger.

Get the value of the argument at the given index as a Integer, performing automatic type conversion as necessary.

public int
getInvocationIndex()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getInvocationIndex.

Get the index of the current test invocation.

public @Nullable Long
getLong(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getLong.

Get the value of the argument at the given index as a Long, performing automatic type conversion as necessary.

public @Nullable Short
getShort(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getShort.

Get the value of the argument at the given index as a Short, performing automatic type conversion as necessary.

public @Nullable String
getString(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getString.

Get the value of the argument at the given index as a String, performing automatic type conversion as necessary.

public int
size()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.size.

Get the number of arguments in this accessor.

public @Nullable Object[]
toArray()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.toArray.

Get all arguments in this accessor as an array.

public List<@Nullable Object>
toList()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.toList.

Get all arguments in this accessor as an immutable list.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argumentsback to summary
private final @Nullable Object[] arguments
converterback to summary
private final BiFunction<@Nullable Object, Class<?>, @Nullable Object> converter
invocationIndexback to summary
private final int invocationIndex

Constructor Detail

DefaultArgumentsAccessorback to summary
private DefaultArgumentsAccessor(BiFunction<@Nullable Object, Class<?>, @Nullable Object> converter, int invocationIndex, @Nullable Object... arguments)

Method Detail

createback to summary
public static DefaultArgumentsAccessor create(int invocationIndex, ClassLoader classLoader, @Nullable Object[] arguments)
getback to summary
public @Nullable Object get(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.get.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.get.

Get the value of the argument at the given index as an Object.

Annotations
@Override
getback to summary
public <T> @Nullable T get(int index, Class<T> requiredType)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.get.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.get.

Get the value of the argument at the given index as an instance of the required type.

Annotations
@Override
getBooleanback to summary
public @Nullable Boolean getBoolean(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getBoolean.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getBoolean.

Get the value of the argument at the given index as a Boolean, performing automatic type conversion as necessary.

Annotations
@Override
getByteback to summary
public @Nullable Byte getByte(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getByte.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getByte.

Get the value of the argument at the given index as a Byte, performing automatic type conversion as necessary.

Annotations
@Override
getCharacterback to summary
public @Nullable Character getCharacter(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getCharacter.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getCharacter.

Get the value of the argument at the given index as a Character, performing automatic type conversion as necessary.

Annotations
@Override
getDoubleback to summary
public @Nullable Double getDouble(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getDouble.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getDouble.

Get the value of the argument at the given index as a Double, performing automatic type conversion as necessary.

Annotations
@Override
getFloatback to summary
public @Nullable Float getFloat(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getFloat.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getFloat.

Get the value of the argument at the given index as a Float, performing automatic type conversion as necessary.

Annotations
@Override
getIntegerback to summary
public @Nullable Integer getInteger(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getInteger.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getInteger.

Get the value of the argument at the given index as a Integer, performing automatic type conversion as necessary.

Annotations
@Override
getInvocationIndexback to summary
public int getInvocationIndex()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getInvocationIndex.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getInvocationIndex.

Get the index of the current test invocation.

Annotations
@Override
getLongback to summary
public @Nullable Long getLong(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getLong.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getLong.

Get the value of the argument at the given index as a Long, performing automatic type conversion as necessary.

Annotations
@Override
getShortback to summary
public @Nullable Short getShort(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getShort.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getShort.

Get the value of the argument at the given index as a Short, performing automatic type conversion as necessary.

Annotations
@Override
getStringback to summary
public @Nullable String getString(int index)

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.getString.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.getString.

Get the value of the argument at the given index as a String, performing automatic type conversion as necessary.

Annotations
@Override
sizeback to summary
public int size()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.size.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.size.

Get the number of arguments in this accessor.

Annotations
@Override
toArrayback to summary
public @Nullable Object[] toArray()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.toArray.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.toArray.

Get all arguments in this accessor as an array.

Annotations
@Override
toListback to summary
public List<@Nullable Object> toList()

Implements org.junit.jupiter.params.aggregator.ArgumentsAccessor.toList.

Doc from org.junit.jupiter.params.aggregator.ArgumentsAccessor.toList.

Get all arguments in this accessor as an immutable list.

Annotations
@Override