org.picocontainer.defaults
Class ImmutablePicoContainerProxyFactory
java.lang.Object
org.picocontainer.defaults.ImmutablePicoContainerProxyFactory
- All Implemented Interfaces:
- java.io.Serializable, java.lang.reflect.InvocationHandler
public class ImmutablePicoContainerProxyFactory
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler, java.io.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 |
interfaces
private static final java.lang.Class[] interfaces
startMethod
protected static java.lang.reflect.Method startMethod
stopMethod
protected static java.lang.reflect.Method stopMethod
disposeMethod
protected static java.lang.reflect.Method disposeMethod
equalsMethod
protected static java.lang.reflect.Method equalsMethod
pico
private final PicoContainer pico
ImmutablePicoContainerProxyFactory
protected ImmutablePicoContainerProxyFactory(PicoContainer pico)
- Construct a ImmutablePicoContainerProxyFactory.
- Parameters:
pico
- the container to hide
- Throws:
java.lang.NullPointerException
- if pico is null
- Since:
- 1.2
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.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:
java.lang.NullPointerException
- if pico is null
- Since:
- 1.2