public abstract class AbstractObjectConverter<V>
extends java.lang.Object
| Constructor and Description |
|---|
AbstractObjectConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIfArgumentsMatchParameterTypes(java.lang.Object[] arguments,
java.lang.Class<?>[] parameterTypes)
Checks if the types of the given
arguments matches the given test methods parameterTypes and throws an Error
if not. |
abstract java.lang.Object[] |
convert(V data,
boolean isVarArgs,
java.lang.Class<?>[] parameterTypes)
Converts the given
data to its corresponding arguments using the provided information. |
public abstract java.lang.Object[] convert(V data, boolean isVarArgs, java.lang.Class<?>[] parameterTypes)
data to its corresponding arguments using the provided information. Additionally
checks the arguments against the given parameter types before returning.data - array of arguments for test methodisVarArgs - determines whether test method has a varargs parameterparameterTypes - target types of parametersObject[] which is converted for varargs support and checked against parameterTypesjava.lang.IllegalArgumentException - iif the data does not fit somehowprotected void checkIfArgumentsMatchParameterTypes(java.lang.Object[] arguments,
java.lang.Class<?>[] parameterTypes)
arguments matches the given test methods parameterTypes and throws an Error
if not.
This method is package private (= visible) for testing.
arguments - the arguments to be used for each test method to be executedparameterTypes - test method parameter types (from Method.getParameterTypes())java.lang.NullPointerException - iif given parameterTypes or settings are nulljava.lang.IllegalArgumentException - iif test methods parameter types does not match the given arguments