Class ValueRecorder

java.lang.Object
org.codehaus.groovy.runtime.powerassert.ValueRecorder

public class ValueRecorder extends Object
Records values produced during evaluation of an assertion statement's truth expression.
  • Constructor Details

    • ValueRecorder

      public ValueRecorder()
  • Method Details

    • clear

      public void clear()
      Removes all values recorded for the current assertion evaluation.
    • record

      public Object record(Object value, int anchor)
      Records a value at the supplied anchor column and returns it unchanged.
      Parameters:
      value - the value produced while evaluating the assertion
      anchor - the 1-based column in the normalized assertion text, or a non-positive value if the position is unknown
      Returns:
      value
    • getValues

      public List<Value> getValues()
      Returns the recorded values in recording order.
      Returns:
      the live list of recorded values