org.picocontainer.defaults
Class ImmutablePicoContainerProxyFactory

java.lang.Object
  extended by org.picocontainer.defaults.ImmutablePicoContainerProxyFactory
All Implemented Interfaces:
Serializable, InvocationHandler

public class ImmutablePicoContainerProxyFactory
extends Object
implements InvocationHandler, Serializable

A factory for immutable PicoContainer proxies.

Since:
1.2
Author:
Jörg Schaible
See Also:
Serialized Form

Field Summary
protected static Method disposeMethod
           
protected static Method equalsMethod
           
protected static Method startMethod
           
protected static Method stopMethod
           
 
Constructor Summary
protected ImmutablePicoContainerProxyFactory(PicoContainer pico)
          Construct a ImmutablePicoContainerProxyFactory.
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
           
static PicoContainer newProxyInstance(PicoContainer pico)
          Create a new immutable PicoContainer proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startMethod

protected static Method startMethod

stopMethod

protected static Method stopMethod

disposeMethod

protected static Method disposeMethod

equalsMethod

protected static Method equalsMethod
Constructor Detail

ImmutablePicoContainerProxyFactory

protected ImmutablePicoContainerProxyFactory(PicoContainer pico)
Construct a ImmutablePicoContainerProxyFactory.

Parameters:
pico - the container to hide
Throws:
NullPointerException - if pico is null
Since:
1.2
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

newProxyInstance

public static PicoContainer newProxyInstance(PicoContainer pico)
Create a new immutable PicoContainer proxy. The proxy will completly hide the implementation of the given PicoContainer and will also prevent the invocation of any methods of the lifecycle methods from Startable or Disposable.

Parameters:
pico -
Returns:
the new proxy
Throws:
NullPointerException - if pico is null
Since:
1.2


Copyright © 2003-2010 Codehaus. All Rights Reserved.