public class ParameterUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NULL_VALUE |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.List<com.epam.ta.reportportal.ws.model.ParameterResource> |
getParameters(java.lang.reflect.Executable method,
java.util.List<T> parameterValues)
Read all parameters from a method or a constructor and converts in into a list of
ParameterResource. |
static <T> java.util.List<com.epam.ta.reportportal.ws.model.ParameterResource> |
getParameters(java.lang.String codeRef,
java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,T>> parameters)
Read all parameters from a method or a constructor and converts in into a list of
ParameterResource. |
static java.lang.Class<?> |
toBoxedType(java.lang.Class<?> primitiveType)
Converts primitive type to a corresponding boxed class, or returns the same instance if the input is not primitive.
|
public static final java.lang.String NULL_VALUE
@Nonnull
public static <T> java.util.List<com.epam.ta.reportportal.ws.model.ParameterResource> getParameters(@Nonnull
java.lang.reflect.Executable method,
@Nullable
java.util.List<T> parameterValues)
ParameterResource.
Respects ParameterKey annotation.T - parameter values typemethod - a method to read parametersparameterValues - a source of parameter valuespublic static java.lang.Class<?> toBoxedType(@Nonnull
java.lang.Class<?> primitiveType)
primitiveType - a class which needs to be boxed@Nonnull
public static <T> java.util.List<com.epam.ta.reportportal.ws.model.ParameterResource> getParameters(@Nullable
java.lang.String codeRef,
@Nullable
java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,T>> parameters)
ParameterResource.
Respects ParameterKey annotation.T - parameter values typecodeRef - a method reference to read parametersparameters - a source of parameter values and parameter names if not set by ParameterKey annotation