org.picocontainer.defaults
Class ImmutablePicoContainerProxyFactory
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
startMethod
protected static Method startMethod
stopMethod
protected static Method stopMethod
disposeMethod
protected static Method disposeMethod
equalsMethod
protected static Method equalsMethod
ImmutablePicoContainerProxyFactory
protected ImmutablePicoContainerProxyFactory(PicoContainer pico)
- Construct a ImmutablePicoContainerProxyFactory.
- Parameters:
pico
- the container to hide
- Throws:
NullPointerException
- if pico is null
- Since:
- 1.2
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-2007 Codehaus. All Rights Reserved.