org.mockcentral.server
Class ParamsBuilder

java.lang.Object
  extended by org.mockcentral.server.ParamsBuilder

public class ParamsBuilder
extends java.lang.Object

A class used to build a ContraintMatcher matching the expected parameter list for a Mock Object method expectation.

The "add" and "set" methods defined in this class are invoked by the org.apache.commons.digester.Digester when the configuration file is parsed, and should not be called by clients.

Author:
David Hutchinson

Constructor Summary
ParamsBuilder()
          Creates a new instance.
 
Method Summary
static com.mockobjects.dynamic.ConstraintMatcher buildParams(MethodExpectationBean bean)
          Creates and returns a ConstraintMatcher instance using the supplied MethodExpectationBean object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamsBuilder

public ParamsBuilder()
Creates a new instance.

Method Detail

buildParams

public static com.mockobjects.dynamic.ConstraintMatcher buildParams(MethodExpectationBean bean)
                                                             throws UnknownProxyException,
                                                                    MockCentralServerException
Creates and returns a ConstraintMatcher instance using the supplied MethodExpectationBean object. If the bean specifies that the method will accept any parameters, an AnyConstraintMatcher is created, otherwise a FullConstraintMatcher is created and populated with IsEqual objects reflecting the parameter data.

Parameters:
bean - the MethodExpectationBean from which to create the instance.
Returns:
the ConstraintMatcher used to construct the parameter list.
Throws:
UnknownProxyException - if a method parameter was designated as a Mock Object proxy and the proxy was not found.
MockCentralServerException - if a method parameter could not be constructed for another reason.
See Also:
MethodExpectationBean