public class JdonPicoContainer extends Object implements org.picocontainer.MutablePicoContainer, org.picocontainer.defaults.ComponentMonitorStrategy, Serializable
| 构造器和说明 |
|---|
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)
|
public static final String module
public JdonPicoContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory,
org.picocontainer.PicoContainer parent)
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).public JdonPicoContainer(org.picocontainer.PicoContainer parent,
ConfigInfo configInfo)
DefaultComponentAdapterFactory and a parent container.public JdonPicoContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory)
componentAdapterFactory - the ComponentAdapterFactory to use.public JdonPicoContainer(ConfigInfo configInfo)
DefaultComponentAdapterFactory and no parent container.public Collection getComponentAdapters()
getComponentAdapters 在接口中 org.picocontainer.PicoContainerpublic final org.picocontainer.ComponentAdapter getComponentAdapter(Object componentKey) throws org.picocontainer.defaults.AmbiguousComponentResolutionException
getComponentAdapter 在接口中 org.picocontainer.PicoContainerorg.picocontainer.defaults.AmbiguousComponentResolutionExceptionpublic org.picocontainer.ComponentAdapter getComponentAdapterOfType(Class componentType)
getComponentAdapterOfType 在接口中 org.picocontainer.PicoContainerpublic List getComponentAdaptersOfType(Class componentType)
getComponentAdaptersOfType 在接口中 org.picocontainer.PicoContainerpublic org.picocontainer.ComponentAdapter registerComponent(org.picocontainer.ComponentAdapter componentAdapter)
throws org.picocontainer.defaults.DuplicateComponentKeyRegistrationException
ComponentAdapterFactory passed to the constructor
of this container.registerComponent 在接口中 org.picocontainer.MutablePicoContainerorg.picocontainer.defaults.DuplicateComponentKeyRegistrationExceptionpublic org.picocontainer.ComponentAdapter unregisterComponent(Object componentKey)
unregisterComponent 在接口中 org.picocontainer.MutablePicoContainerpublic org.picocontainer.ComponentAdapter registerComponentInstance(Object component) throws org.picocontainer.PicoRegistrationException
InstanceComponentAdapter.registerComponentInstance 在接口中 org.picocontainer.MutablePicoContainerorg.picocontainer.PicoRegistrationExceptionpublic org.picocontainer.ComponentAdapter registerComponentInstance(Object componentKey, Object componentInstance) throws org.picocontainer.PicoRegistrationException
InstanceComponentAdapter.registerComponentInstance 在接口中 org.picocontainer.MutablePicoContainerorg.picocontainer.PicoRegistrationExceptionpublic org.picocontainer.ComponentAdapter registerComponentImplementation(Class componentImplementation) throws org.picocontainer.PicoRegistrationException
ComponentAdapterFactory passed to the container's constructor.registerComponentImplementation 在接口中 org.picocontainer.MutablePicoContainerorg.picocontainer.PicoRegistrationExceptionpublic org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation) throws org.picocontainer.PicoRegistrationException
ComponentAdapterFactory passed to the container's constructor.registerComponentImplementation 在接口中 org.picocontainer.MutablePicoContainerorg.picocontainer.PicoRegistrationExceptionpublic org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, org.picocontainer.Parameter[] parameters) throws org.picocontainer.PicoRegistrationException
ComponentAdapterFactory passed to the container's constructor.registerComponentImplementation 在接口中 org.picocontainer.MutablePicoContainerorg.picocontainer.PicoRegistrationExceptionpublic org.picocontainer.ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, List parameters) throws org.picocontainer.PicoRegistrationException
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.PicoRegistrationExceptionpublic List getComponentInstances() throws org.picocontainer.PicoException
getComponentInstances 在接口中 org.picocontainer.PicoContainerorg.picocontainer.PicoExceptionpublic List getComponentInstancesOfType(Class componentType) throws org.picocontainer.PicoException
getComponentInstancesOfType 在接口中 org.picocontainer.PicoContainerorg.picocontainer.PicoExceptionpublic Object getComponentInstance(Object componentKey) throws org.picocontainer.PicoException
getComponentInstance 在接口中 org.picocontainer.PicoContainerorg.picocontainer.PicoExceptionpublic Object getComponentInstanceOfType(Class componentType)
getComponentInstanceOfType 在接口中 org.picocontainer.PicoContainerpublic Object getInstance(org.picocontainer.ComponentAdapter componentAdapter)
componentAdapter - public org.picocontainer.PicoContainer getParent()
getParent 在接口中 org.picocontainer.PicoContainerpublic org.picocontainer.ComponentAdapter unregisterComponentByInstance(Object componentInstance)
unregisterComponentByInstance 在接口中 org.picocontainer.MutablePicoContainerpublic void verify()
throws org.picocontainer.PicoVerificationException
verify 在接口中 org.picocontainer.PicoContainerorg.picocontainer.PicoVerificationExceptionpublic void start()
Startable will be started.start 在接口中 org.picocontainer.StartablemakeChildContainer(),
addChildContainer(PicoContainer),
removeChildContainer(PicoContainer)public void stop()
Startable will be stopped.stop 在接口中 org.picocontainer.StartablemakeChildContainer(),
addChildContainer(PicoContainer),
removeChildContainer(PicoContainer)public void clearGurad()
public void dispose()
Disposable will be disposed.dispose 在接口中 org.picocontainer.DisposablemakeChildContainer(),
addChildContainer(PicoContainer),
removeChildContainer(PicoContainer)public org.picocontainer.MutablePicoContainer makeChildContainer()
makeChildContainer 在接口中 org.picocontainer.MutablePicoContainerpublic boolean addChildContainer(org.picocontainer.PicoContainer child)
addChildContainer 在接口中 org.picocontainer.MutablePicoContainerpublic boolean removeChildContainer(org.picocontainer.PicoContainer child)
removeChildContainer 在接口中 org.picocontainer.MutablePicoContainerpublic void accept(org.picocontainer.PicoVisitor visitor)
accept 在接口中 org.picocontainer.PicoContainerpublic void changeMonitor(org.picocontainer.ComponentMonitor monitor)
changeMonitor 在接口中 org.picocontainer.defaults.ComponentMonitorStrategypublic org.picocontainer.ComponentMonitor currentMonitor()
currentMonitor 在接口中 org.picocontainer.defaults.ComponentMonitorStrategyorg.picocontainer.PicoIntrospectionException - if no component monitor is found in container or its childrenCopyright © 2018. All rights reserved.