com.agical.rmock.core.describe
Interface ExpressionDescriber

All Known Implementing Classes:
ExpressionDescriberImpl

public interface ExpressionDescriber

Provides an API so that expressions can describe themselves. The description process works like the visitor-pattern. The describer visits an expectation so that the expectation can describe itself and pass subexpressions to be described. (c) Agical AB 2005

Author:
joakim.ohlrogge

Method Summary
 void beginArray(java.lang.Class type, int length)
          marks the beginning of an array
 void beginGroup()
          Signals the beginning of an expression
 void describe(Constraint describedConstraint)
           
 void describeInverted(Expression wrappedConstraint)
          describe this constraint as inverted
ie !wrappedConstraint
 void describeReference(java.lang.String referenceDescription)
          Describes a reference
 void endArray()
          ends the current array
 void endGroup()
          Signals the end of an expression
 void operator(java.lang.String operator)
          Inserts an operator in the constraint.
 

Method Detail

beginGroup

void beginGroup()
                throws java.io.IOException
Signals the beginning of an expression

Throws:
java.io.IOException

describe

void describe(Constraint describedConstraint)
              throws java.io.IOException
Parameters:
describedConstraint -
Throws:
java.io.IOException

describeInverted

void describeInverted(Expression wrappedConstraint)
                      throws java.io.IOException
describe this constraint as inverted
ie !wrappedConstraint

Parameters:
wrappedConstraint -
Throws:
java.io.IOException

operator

void operator(java.lang.String operator)
              throws java.io.IOException
Inserts an operator in the constraint.

Parameters:
operator - An operator, usually a sign like &&, || etc
Throws:
java.io.IOException

endGroup

void endGroup()
              throws java.io.IOException
Signals the end of an expression

Throws:
java.io.IOException

describeReference

void describeReference(java.lang.String referenceDescription)
                       throws java.io.IOException
Describes a reference

Parameters:
referenceDescription -
Throws:
java.io.IOException

beginArray

void beginArray(java.lang.Class type,
                int length)
                throws java.io.IOException
marks the beginning of an array

Throws:
java.io.IOException

endArray

void endArray()
              throws java.io.IOException
ends the current array

Throws:
java.io.IOException


Copyright © 2005-2008 Agical AB. All Rights Reserved.