org.spockframework.runtime.model
Class IterationInfo

java.lang.Object
  extended by org.spockframework.runtime.model.NodeInfo<FeatureInfo,java.lang.reflect.AnnotatedElement>
      extended by org.spockframework.runtime.model.IterationInfo

public class IterationInfo
extends NodeInfo<FeatureInfo,java.lang.reflect.AnnotatedElement>

Runtime information about an iteration of a feature method.


Constructor Summary
IterationInfo(FeatureInfo feature, java.lang.Object[] dataValues, int estimatedNumIterations)
           
 
Method Summary
 java.lang.Object[] getDataValues()
          Return this iteration's data values for the ongoing execution of the owning feature method.
 int getEstimatedNumIterations()
          Returns the estimated total number of iterations for the ongoing execution of the owning feature method.
 java.lang.String getName()
          Returns the name of this iteration.
 java.lang.reflect.AnnotatedElement getReflection()
           
 
Methods inherited from class org.spockframework.runtime.model.NodeInfo
getDescription, getLine, getMetadata, getParent, isStub, setDescription, setLine, setMetadata, setName, setParent, setReflection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterationInfo

public IterationInfo(FeatureInfo feature,
                     java.lang.Object[] dataValues,
                     int estimatedNumIterations)
Method Detail

getReflection

public java.lang.reflect.AnnotatedElement getReflection()
Overrides:
getReflection in class NodeInfo<FeatureInfo,java.lang.reflect.AnnotatedElement>

getName

public java.lang.String getName()
Returns the name of this iteration. No strong guarantees are provided for this name, except that it is non-null. For example, it may be the same as the feature name, and it may not be unique among iterations of the same feature execution. Nevertheless, this is generally the name that should be presented to the user (if any).

Overrides:
getName in class NodeInfo<FeatureInfo,java.lang.reflect.AnnotatedElement>
Returns:
the name of this iteration

getDataValues

public java.lang.Object[] getDataValues()
Return this iteration's data values for the ongoing execution of the owning feature method. The names of the data values (in the same order) are available through FeatureInfo.getDataVariables().

Returns:
this iteration's data values for the ongoing execution of the owning feature method

getEstimatedNumIterations

public int getEstimatedNumIterations()
Returns the estimated total number of iterations for the ongoing execution of the owning feature method. The value is obtained by calling size() on each data provider before the first iteration is run. It is only an estimate and won't change during feature execution (i.e. all FeatureInfos will return the same value).

Returns:
the estimated total number of iterations for the execution of the owning feature method


Copyright © 2013. All rights reserved