public final class TypedArgument extends Object
Reflection to specify the type of a parameter along with the corresponding argument
value. This allows passing an instance of a more derived type, or passing null and still having the type of the
parameter.| Modifier and Type | Method and Description |
|---|---|
static TypedArgument |
typed(Class<?> type,
Object value)
Factory method.
|
static Class<?>[] |
types(TypedArgument... arguments)
Extract the parameter types from an array of
TypedArguments. |
static Object[] |
values(TypedArgument... arguments)
Extract the argument values from an array of
TypedArguments. |
public static TypedArgument typed(Class<?> type, Object value)
type - the type of the parameter.value - the value of the argument.public static Class<?>[] types(TypedArgument... arguments)
TypedArguments.arguments - the arguments to extract the types from.public static Object[] values(TypedArgument... arguments)
TypedArguments.arguments - the arguments to extract the values from.Copyright © 2019. All rights reserved.