com.agical.rmock.core
Interface ProxyFactory

All Superinterfaces:
RMockSingletonService
All Known Implementing Classes:
CglibProxyFactory

public interface ProxyFactory
extends RMockSingletonService

(c) Agical AB 2005

Author:
joakim.ohlrogge

Method Summary
 void clear()
          Clear the state of the proxy factory
 Object createInterfaceInterceptionProxy(Class itf, String id)
           
 Object createInterfaceProxy(Class clazz, String id)
          Implementations must create a proxy to an interface of the specified class.
 Object createObjectInterceptionProxy(Class clazz, Class[] signature, Object[] args, String id)
          Implementations must create an intercepting proxy to an object of the specified class using the specified signature providing the specified arguments
 Object createObjectInterceptionProxy(Class clazz, Object[] args, String id)
          Implementations creates an intercepting proxy to an object of the specified type if there is one and only one constructor assignable from the provided arguments
 Object createObjectMockProxy(Class clazz, Class[] signature, Object[] args, String id)
          Implementations must create a mocking proxy to an object of the specified class using the specified signature providing the specified arguments
 Object createObjectMockProxy(Class clazz, Object[] args, String id)
          Implementations creates a mocking proxy to an object of the specified type if there is one and only one constructor assignable from the provided arguments
 Object createObjectMonitorProxy(Class clazz, Class[] parameterTypes, Object[] objects, String string)
          Implementation must create an intercepting proxy of the given class with the given arguments by using the constructor taking the parameter types provided.
 Object createObjectMonitorProxy(Class clazz, Object[] objects, String string)
          Implementation must create an intercepting proxy of the given class by finding the most suitable constructor.
 

Method Detail

createInterfaceProxy

Object createInterfaceProxy(Class clazz,
                            String id)
Implementations must create a proxy to an interface of the specified class.

Parameters:
clazz -
id - Unique id for the proxy
Returns:
proxy

createObjectMockProxy

Object createObjectMockProxy(Class clazz,
                             Object[] args,
                             String id)
Implementations creates a mocking proxy to an object of the specified type if there is one and only one constructor assignable from the provided arguments

Parameters:
clazz -
args -
id - Unique id for the proxy
Returns:
proxy

createObjectMockProxy

Object createObjectMockProxy(Class clazz,
                             Class[] signature,
                             Object[] args,
                             String id)
Implementations must create a mocking proxy to an object of the specified class using the specified signature providing the specified arguments

Parameters:
clazz -
signature -
args -
id - Unique id for the proxy
Returns:
proxy

clear

void clear()
Clear the state of the proxy factory


createObjectInterceptionProxy

Object createObjectInterceptionProxy(Class clazz,
                                     Object[] args,
                                     String id)
Implementations creates an intercepting proxy to an object of the specified type if there is one and only one constructor assignable from the provided arguments

Parameters:
clazz -
args -
id - Unique id for the proxy
Returns:
proxy

createObjectInterceptionProxy

Object createObjectInterceptionProxy(Class clazz,
                                     Class[] signature,
                                     Object[] args,
                                     String id)
Implementations must create an intercepting proxy to an object of the specified class using the specified signature providing the specified arguments

Parameters:
clazz -
signature -
args -
id - Unique id for the proxy
Returns:
proxy

createObjectMonitorProxy

Object createObjectMonitorProxy(Class clazz,
                                Class[] parameterTypes,
                                Object[] objects,
                                String string)
Implementation must create an intercepting proxy of the given class with the given arguments by using the constructor taking the parameter types provided.

Parameters:
clazz -
parameterTypes -
objects -
string -
Returns:

createObjectMonitorProxy

Object createObjectMonitorProxy(Class clazz,
                                Object[] objects,
                                String string)
Implementation must create an intercepting proxy of the given class by finding the most suitable constructor.

Parameters:
clazz -
objects -
string -
Returns:

createInterfaceInterceptionProxy

Object createInterfaceInterceptionProxy(Class itf,
                                        String id)
Parameters:
itf -
id -
Returns:


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