org.spockframework.runtime.model
Class ExpressionInfo

java.lang.Object
  extended by org.spockframework.runtime.model.ExpressionInfo
All Implemented Interfaces:
java.lang.Iterable<ExpressionInfo>

public class ExpressionInfo
extends java.lang.Object
implements java.lang.Iterable<ExpressionInfo>

Author:
Peter Niederwieser

Field Summary
static java.lang.String TEXT_NOT_AVAILABLE
           
static java.lang.Object VALUE_NOT_AVAILABLE
          Indicates that an expression's value is not available, either because the expression has no value (e.g.
 
Constructor Summary
ExpressionInfo(TextRegion region, TextPosition anchor, java.lang.String operation, ExpressionInfo... children)
           
ExpressionInfo(TextRegion region, TextPosition anchor, java.lang.String operation, java.util.List<ExpressionInfo> children)
           
 
Method Summary
 TextPosition getAnchor()
           
 java.util.List<ExpressionInfo> getChildren()
           
 java.lang.String getEffectiveRenderedValue()
           
 java.lang.String getOperation()
           
 TextRegion getRegion()
           
 java.lang.String getRenderedValue()
           
 java.lang.String getText()
           
 java.lang.Object getValue()
           
 java.lang.Iterable<ExpressionInfo> inCustomOrder(boolean skipIrrelevant, java.util.Comparator<ExpressionInfo> comparator)
           
 java.lang.Iterable<ExpressionInfo> inPostfixOrder(boolean skipIrrelevant)
           
 java.lang.Iterable<ExpressionInfo> inPrefixOrder(boolean skipIrrelevant)
           
 boolean isEqualityComparison()
           
 boolean isEqualityComparison(java.lang.Class<?>... types)
           
 boolean isRelevant()
           
 java.util.Iterator<ExpressionInfo> iterator()
           
 ExpressionInfo setRelevant(boolean relevant)
           
 void setRenderedValue(java.lang.String renderedValue)
           
 void setText(java.lang.String text)
           
 ExpressionInfo setValue(java.lang.Object value)
           
 void shiftVertically(int numLines)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT_NOT_AVAILABLE

public static final java.lang.String TEXT_NOT_AVAILABLE

VALUE_NOT_AVAILABLE

public static final java.lang.Object VALUE_NOT_AVAILABLE
Indicates that an expression's value is not available, either because the expression has no value (e.g. def foo = 42), or because it wasn't evaluated (due to shortcut evaluation of boolean expressions).

Constructor Detail

ExpressionInfo

public ExpressionInfo(TextRegion region,
                      TextPosition anchor,
                      java.lang.String operation,
                      java.util.List<ExpressionInfo> children)

ExpressionInfo

public ExpressionInfo(TextRegion region,
                      TextPosition anchor,
                      java.lang.String operation,
                      ExpressionInfo... children)
Method Detail

getRegion

public TextRegion getRegion()

getAnchor

public TextPosition getAnchor()

getOperation

public java.lang.String getOperation()

getChildren

public java.util.List<ExpressionInfo> getChildren()

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getValue

public java.lang.Object getValue()

setValue

public ExpressionInfo setValue(java.lang.Object value)

getRenderedValue

public java.lang.String getRenderedValue()

setRenderedValue

public void setRenderedValue(java.lang.String renderedValue)

getEffectiveRenderedValue

public java.lang.String getEffectiveRenderedValue()

isRelevant

public boolean isRelevant()

setRelevant

public ExpressionInfo setRelevant(boolean relevant)

shiftVertically

public void shiftVertically(int numLines)

iterator

public java.util.Iterator<ExpressionInfo> iterator()
Specified by:
iterator in interface java.lang.Iterable<ExpressionInfo>

inPrefixOrder

public java.lang.Iterable<ExpressionInfo> inPrefixOrder(boolean skipIrrelevant)

inPostfixOrder

public java.lang.Iterable<ExpressionInfo> inPostfixOrder(boolean skipIrrelevant)

inCustomOrder

public java.lang.Iterable<ExpressionInfo> inCustomOrder(boolean skipIrrelevant,
                                                        java.util.Comparator<ExpressionInfo> comparator)

isEqualityComparison

public boolean isEqualityComparison()

isEqualityComparison

public boolean isEqualityComparison(java.lang.Class<?>... types)


Copyright © 2013. All rights reserved