public class Parameter extends Object
Constructor and Description |
---|
Parameter() |
Parameter(Path path) |
Parameter(String json) |
Modifier and Type | Method and Description |
---|---|
static void |
consume(Class expectedType,
EvaluationContext ctx,
Collection collection,
Object value)
Either consume the object as an array and add each element to the collection, or alternatively add each element
|
ILateBindingValue |
getILateBingValue() |
String |
getJson() |
Path |
getPath() |
ParamType |
getType() |
Object |
getValue() |
boolean |
hasEvaluated() |
void |
setEvaluated(Boolean evaluated) |
void |
setJson(String json) |
void |
setLateBinding(ILateBindingValue lateBinding) |
void |
setPath(Path path) |
void |
setType(ParamType type) |
static <T> List<T> |
toList(Class<T> type,
EvaluationContext ctx,
List<Parameter> parameters)
Translate the collection of parameters into a collection of values of type T.
|
public Parameter()
public Parameter(String json)
public Parameter(Path path)
public Object getValue()
public void setLateBinding(ILateBindingValue lateBinding)
public Path getPath()
public void setEvaluated(Boolean evaluated)
public boolean hasEvaluated()
public ParamType getType()
public void setType(ParamType type)
public void setPath(Path path)
public String getJson()
public void setJson(String json)
public ILateBindingValue getILateBingValue()
public static <T> List<T> toList(Class<T> type, EvaluationContext ctx, List<Parameter> parameters)
T
- Type T returned as a List of T.type
- The type to translate the collection into.ctx
- Context.parameters
- Collection of parameters.public static void consume(Class expectedType, EvaluationContext ctx, Collection collection, Object value)
expectedType
- the expected class type to consume, if null or not of this type the element is not added to the array.ctx
- the JSON context to determine if this is an array or value.collection
- The collection to append into.value
- The value to evaluate.Copyright © 2024. All rights reserved.