com.jdon.container.pico
类 JdonPicoContainer

java.lang.Object
  继承者 com.jdon.container.pico.JdonPicoContainer
所有已实现的接口:
Serializable, org.picocontainer.defaults.ComponentMonitorStrategy, org.picocontainer.Disposable, org.picocontainer.MutablePicoContainer, org.picocontainer.PicoContainer, org.picocontainer.Startable

public class JdonPicoContainer
extends Object
implements org.picocontainer.MutablePicoContainer, org.picocontainer.defaults.ComponentMonitorStrategy, Serializable

Customized DefaultPicoContainer modify the method getComponentInstance of DefaultPicoContainer of picocontainer, new method is in JdonConstructorInjectionComponentAdapter

作者:
banq
另请参见:
序列化表格

字段摘要
static String module
           
 
构造方法摘要
JdonPicoContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory)
          Creates a new container with a custom ComponentAdapterFactory and no parent container.
JdonPicoContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory, org.picocontainer.PicoContainer parent)
          Creates a new container with a custom ComponentAdapterFactory and a parent container.
JdonPicoContainer(ConfigInfo configInfo)
          Creates a new container with a (caching) DefaultComponentAdapterFactory and no parent container.
JdonPicoContainer(org.picocontainer.PicoContainer parent, ConfigInfo configInfo)
          Creates a new container with a (caching) DefaultComponentAdapterFactory and a parent container.
 
方法摘要
 void accept(org.picocontainer.PicoVisitor visitor)
           
 boolean addChildContainer(org.picocontainer.PicoContainer child)
           
 void changeMonitor(org.picocontainer.ComponentMonitor monitor)
          Changes monitor in the ComponentAdapterFactory, the component adapters and the child containers, if these support a ComponentMonitorStrategy.
 void clearGurad()
           
 org.picocontainer.ComponentMonitor currentMonitor()
          Returns the first current monitor found in the ComponentAdapterFactory, the component adapters and the child containers, if these support a ComponentMonitorStrategy.
 void dispose()
          Dispose the components of this PicoContainer and all its logical child containers.
 org.picocontainer.ComponentAdapter getComponentAdapter(Object componentKey)
           
 org.picocontainer.ComponentAdapter getComponentAdapterOfType(Class componentType)
           
 Collection getComponentAdapters()
           
 List getComponentAdaptersOfType(Class componentType)
           
 Object getComponentInstance(Object componentKey)
           
 Object getComponentInstanceOfType(Class componentType)
           
 List getComponentInstances()
           
 List getComponentInstancesOfType(Class componentType)
           
 Object getInstance(org.picocontainer.ComponentAdapter componentAdapter)
          modify this method of old DefaultPicocontainer
 org.picocontainer.PicoContainer getParent()
           
 org.picocontainer.MutablePicoContainer makeChildContainer()
           
 org.picocontainer.ComponentAdapter registerComponent(org.picocontainer.ComponentAdapter componentAdapter)
           This method can be used to override the ComponentAdapter created by the ComponentAdapterFactory passed to the constructor of this container.
 org.picocontainer.ComponentAdapter registerComponentImplementation(Class componentImplementation)
           The returned ComponentAdapter will be instantiated by the ComponentAdapterFactory passed to the container's constructor.
 org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation)
           The returned ComponentAdapter will be instantiated by the ComponentAdapterFactory passed to the container's constructor.
 org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, List parameters)
          Same as registerComponentImplementation(java.lang.Object, java.lang.Class, org.picocontainer.Parameter[]) but with parameters as a List.
 org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, org.picocontainer.Parameter[] parameters)
           The returned ComponentAdapter will be instantiated by the ComponentAdapterFactory passed to the container's constructor.
 org.picocontainer.ComponentAdapter registerComponentInstance(Object component)
           The returned ComponentAdapter will be an InstanceComponentAdapter.
 org.picocontainer.ComponentAdapter registerComponentInstance(Object componentKey, Object componentInstance)
           The returned ComponentAdapter will be an InstanceComponentAdapter.
 boolean removeChildContainer(org.picocontainer.PicoContainer child)
           
 void start()
          Start the components of this PicoContainer and all its logical child containers.
 void stop()
          Stop the components of this PicoContainer and all its logical child containers.
 org.picocontainer.ComponentAdapter unregisterComponent(Object componentKey)
           
 org.picocontainer.ComponentAdapter unregisterComponentByInstance(Object componentInstance)
           
 void verify()
          已过时。 since 1.1 - Use new VerifyingVisitor().traverse(this)
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

module

public static final String module
构造方法详细信息

JdonPicoContainer

public JdonPicoContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory,
                         org.picocontainer.PicoContainer parent)
Creates a new container with a custom ComponentAdapterFactory and a parent container.

Important note about caching: If you intend the components to be cached, you should pass in a factory that creates CachingComponentAdapter instances, such as for example CachingComponentAdapterFactory. CachingComponentAdapterFactory can delegate to other ComponentAdapterFactories.

参数:
componentAdapterFactory - the factory to use for creation of ComponentAdapters.
parent - the parent container (used for component dependency lookups).

JdonPicoContainer

public JdonPicoContainer(org.picocontainer.PicoContainer parent,
                         ConfigInfo configInfo)
Creates a new container with a (caching) DefaultComponentAdapterFactory and a parent container.


JdonPicoContainer

public JdonPicoContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory)
Creates a new container with a custom ComponentAdapterFactory and no parent container.

参数:
componentAdapterFactory - the ComponentAdapterFactory to use.

JdonPicoContainer

public JdonPicoContainer(ConfigInfo configInfo)
Creates a new container with a (caching) DefaultComponentAdapterFactory and no parent container.

方法详细信息

getComponentAdapters

public Collection getComponentAdapters()
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentAdapters

getComponentAdapter

public final org.picocontainer.ComponentAdapter getComponentAdapter(Object componentKey)
                                                             throws org.picocontainer.defaults.AmbiguousComponentResolutionException
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentAdapter
抛出:
org.picocontainer.defaults.AmbiguousComponentResolutionException

getComponentAdapterOfType

public org.picocontainer.ComponentAdapter getComponentAdapterOfType(Class componentType)
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentAdapterOfType

getComponentAdaptersOfType

public List getComponentAdaptersOfType(Class componentType)
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentAdaptersOfType

registerComponent

public org.picocontainer.ComponentAdapter registerComponent(org.picocontainer.ComponentAdapter componentAdapter)
                                                     throws org.picocontainer.defaults.DuplicateComponentKeyRegistrationException
This method can be used to override the ComponentAdapter created by the ComponentAdapterFactory passed to the constructor of this container.

指定者:
接口 org.picocontainer.MutablePicoContainer 中的 registerComponent
抛出:
org.picocontainer.defaults.DuplicateComponentKeyRegistrationException

unregisterComponent

public org.picocontainer.ComponentAdapter unregisterComponent(Object componentKey)
指定者:
接口 org.picocontainer.MutablePicoContainer 中的 unregisterComponent

registerComponentInstance

public org.picocontainer.ComponentAdapter registerComponentInstance(Object component)
                                                             throws org.picocontainer.PicoRegistrationException
The returned ComponentAdapter will be an InstanceComponentAdapter.

指定者:
接口 org.picocontainer.MutablePicoContainer 中的 registerComponentInstance
抛出:
org.picocontainer.PicoRegistrationException

registerComponentInstance

public org.picocontainer.ComponentAdapter registerComponentInstance(Object componentKey,
                                                                    Object componentInstance)
                                                             throws org.picocontainer.PicoRegistrationException
The returned ComponentAdapter will be an InstanceComponentAdapter.

指定者:
接口 org.picocontainer.MutablePicoContainer 中的 registerComponentInstance
抛出:
org.picocontainer.PicoRegistrationException

registerComponentImplementation

public org.picocontainer.ComponentAdapter registerComponentImplementation(Class componentImplementation)
                                                                   throws org.picocontainer.PicoRegistrationException
The returned ComponentAdapter will be instantiated by the ComponentAdapterFactory passed to the container's constructor.

指定者:
接口 org.picocontainer.MutablePicoContainer 中的 registerComponentImplementation
抛出:
org.picocontainer.PicoRegistrationException

registerComponentImplementation

public org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey,
                                                                          Class componentImplementation)
                                                                   throws org.picocontainer.PicoRegistrationException
The returned ComponentAdapter will be instantiated by the ComponentAdapterFactory passed to the container's constructor.

指定者:
接口 org.picocontainer.MutablePicoContainer 中的 registerComponentImplementation
抛出:
org.picocontainer.PicoRegistrationException

registerComponentImplementation

public org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey,
                                                                          Class componentImplementation,
                                                                          org.picocontainer.Parameter[] parameters)
                                                                   throws org.picocontainer.PicoRegistrationException
The returned ComponentAdapter will be instantiated by the ComponentAdapterFactory passed to the container's constructor.

指定者:
接口 org.picocontainer.MutablePicoContainer 中的 registerComponentImplementation
抛出:
org.picocontainer.PicoRegistrationException

registerComponentImplementation

public org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey,
                                                                          Class componentImplementation,
                                                                          List parameters)
                                                                   throws org.picocontainer.PicoRegistrationException
Same as registerComponentImplementation(java.lang.Object, java.lang.Class, org.picocontainer.Parameter[]) but with parameters as a List. Makes it possible to use with Groovy arrays (which are actually Lists).

抛出:
org.picocontainer.PicoRegistrationException

getComponentInstances

public List getComponentInstances()
                           throws org.picocontainer.PicoException
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentInstances
抛出:
org.picocontainer.PicoException

getComponentInstancesOfType

public List getComponentInstancesOfType(Class componentType)
                                 throws org.picocontainer.PicoException
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentInstancesOfType
抛出:
org.picocontainer.PicoException

getComponentInstance

public Object getComponentInstance(Object componentKey)
                            throws org.picocontainer.PicoException
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentInstance
抛出:
org.picocontainer.PicoException

getComponentInstanceOfType

public Object getComponentInstanceOfType(Class componentType)
指定者:
接口 org.picocontainer.PicoContainer 中的 getComponentInstanceOfType

getInstance

public Object getInstance(org.picocontainer.ComponentAdapter componentAdapter)
modify this method of old DefaultPicocontainer

参数:
componentAdapter -
返回:

getParent

public org.picocontainer.PicoContainer getParent()
指定者:
接口 org.picocontainer.PicoContainer 中的 getParent

unregisterComponentByInstance

public org.picocontainer.ComponentAdapter unregisterComponentByInstance(Object componentInstance)
指定者:
接口 org.picocontainer.MutablePicoContainer 中的 unregisterComponentByInstance

verify

public void verify()
            throws org.picocontainer.PicoVerificationException
已过时。 since 1.1 - Use new VerifyingVisitor().traverse(this)

指定者:
接口 org.picocontainer.PicoContainer 中的 verify
抛出:
org.picocontainer.PicoVerificationException

start

public void start()
Start the components of this PicoContainer and all its logical child containers. Any component implementing the lifecycle interface Startable will be started.

指定者:
接口 org.picocontainer.Startable 中的 start
另请参见:
makeChildContainer(), addChildContainer(PicoContainer), removeChildContainer(PicoContainer)

stop

public void stop()
Stop the components of this PicoContainer and all its logical child containers. Any component implementing the lifecycle interface Startable will be stopped.

指定者:
接口 org.picocontainer.Startable 中的 stop
另请参见:
makeChildContainer(), addChildContainer(PicoContainer), removeChildContainer(PicoContainer)

clearGurad

public void clearGurad()

dispose

public void dispose()
Dispose the components of this PicoContainer and all its logical child containers. Any component implementing the lifecycle interface Disposable will be disposed.

指定者:
接口 org.picocontainer.Disposable 中的 dispose
另请参见:
makeChildContainer(), addChildContainer(PicoContainer), removeChildContainer(PicoContainer)

makeChildContainer

public org.picocontainer.MutablePicoContainer makeChildContainer()
指定者:
接口 org.picocontainer.MutablePicoContainer 中的 makeChildContainer

addChildContainer

public boolean addChildContainer(org.picocontainer.PicoContainer child)
指定者:
接口 org.picocontainer.MutablePicoContainer 中的 addChildContainer

removeChildContainer

public boolean removeChildContainer(org.picocontainer.PicoContainer child)
指定者:
接口 org.picocontainer.MutablePicoContainer 中的 removeChildContainer

accept

public void accept(org.picocontainer.PicoVisitor visitor)
指定者:
接口 org.picocontainer.PicoContainer 中的 accept

changeMonitor

public void changeMonitor(org.picocontainer.ComponentMonitor monitor)
Changes monitor in the ComponentAdapterFactory, the component adapters and the child containers, if these support a ComponentMonitorStrategy.

指定者:
接口 org.picocontainer.defaults.ComponentMonitorStrategy 中的 changeMonitor

currentMonitor

public org.picocontainer.ComponentMonitor currentMonitor()
Returns the first current monitor found in the ComponentAdapterFactory, the component adapters and the child containers, if these support a ComponentMonitorStrategy.

指定者:
接口 org.picocontainer.defaults.ComponentMonitorStrategy 中的 currentMonitor
抛出:
org.picocontainer.PicoIntrospectionException - if no component monitor is found in container or its children


Copyright © 2013. All Rights Reserved.