Class Parameter
java.lang.Object
com.jayway.jsonpath.internal.function.Parameter
Defines a parameter as passed to a function with late binding support for lazy evaluation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconsume(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 elementgetJson()getPath()getType()getValue()booleanvoidsetEvaluated(Boolean evaluated) voidvoidsetLateBinding(ILateBindingValue lateBinding) voidvoidstatic <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.
-
Constructor Details
-
Parameter
public Parameter() -
Parameter
-
Parameter
-
-
Method Details
-
getValue
-
setLateBinding
-
getPath
-
setEvaluated
-
hasEvaluated
public boolean hasEvaluated() -
getType
-
setType
-
setPath
-
getJson
-
setJson
-
getILateBingValue
-
toList
Translate the collection of parameters into a collection of values of type T.- Type Parameters:
T- Type T returned as a List of T.- Parameters:
type- The type to translate the collection into.ctx- Context.parameters- Collection of parameters.- Returns:
- List of T either empty or containing contents.
-
consume
public 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- Parameters:
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.
-