org.apache.aries.unittest.mocks
Interface ReturnTypeHandler


public interface ReturnTypeHandler

Return type handlers return objects that implement the specified class.


Method Summary
 Object handle(Class<?> clazz, Skeleton parent)
          This method is called when a method call handler has not been registered and an object of a specific type needs to be returned.
 

Method Detail

handle

Object handle(Class<?> clazz,
              Skeleton parent)
              throws Exception
This method is called when a method call handler has not been registered and an object of a specific type needs to be returned. The handle method is called along with the type that is required.

Parameters:
clazz - the class to create an object for
parent - the skeleton requesting the class.
Returns:
an instance of the class, or something that can be assigned to it.
Throws:
Exception - if a failure occurs.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.