Class VariableExpressionIterator

java.lang.Object
org.citrusframework.variable.VariableExpressionIterator
All Implemented Interfaces:
Iterator<VariableExpressionIterator.VariableSegment>

public class VariableExpressionIterator extends Object implements Iterator<VariableExpressionIterator.VariableSegment>
This Iterator uses a regular expression pattern to match individual segments of a variableExpression. Each segment of a variable expression represents a bean, either stored as variable in the TestContext (first segment) or a property of the previous bean (all other segments). The iterator provides VariableSegments which provide the name and an optional index as well as the variable/property value corresponding to the segment.

Example: var1.persons[2].firstnames[0]

The iterator will provide the following VariableSegments for this expression

  1. the variable with name var1 from the TestContext
  2. the third element of the persons property of the variable retrieved in the previous step
  3. the first element of the firstnames property of the property retrieved in the previous step
Author:
Thorsten Schlathoelter