public abstract class JdonInstantiatingComponentAdapter
extends org.picocontainer.defaults.AbstractComponentAdapter
implements org.picocontainer.defaults.LifecycleStrategy
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
JdonInstantiatingComponentAdapter.Guard |
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
allowNonPublicClasses
Flag indicating instanciation of non-public classes.
|
protected org.picocontainer.defaults.LifecycleStrategy |
lifecycleStrategy
The strategy used to control the lifecycle
|
protected org.picocontainer.Parameter[] |
parameters
The parameters to use for initialization.
|
protected JdonInstantiatingComponentAdapter.Guard |
verifyingGuard |
| 限定符 | 构造器和说明 |
|---|---|
protected |
JdonInstantiatingComponentAdapter(Object componentKey,
Class componentImplementation,
org.picocontainer.Parameter[] parameters,
boolean allowNonPublicClasses) |
protected |
JdonInstantiatingComponentAdapter(Object componentKey,
Class componentImplementation,
org.picocontainer.Parameter[] parameters,
boolean allowNonPublicClasses,
org.picocontainer.ComponentMonitor monitor)
Constructs a new ComponentAdapter for the given key and implementation.
|
protected |
JdonInstantiatingComponentAdapter(Object componentKey,
Class componentImplementation,
org.picocontainer.Parameter[] parameters,
boolean allowNonPublicClasses,
org.picocontainer.ComponentMonitor monitor,
org.picocontainer.defaults.LifecycleStrategy lifecycleStrategy)
Constructs a new ComponentAdapter for the given key and implementation.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
accept(org.picocontainer.PicoVisitor visitor) |
void |
clear() |
protected org.picocontainer.Parameter[] |
createDefaultParameters(Class[] parameters)
Create default parameters for the given types.
|
void |
dispose(Object component) |
protected abstract Constructor |
getGreediestSatisfiableConstructor(org.picocontainer.PicoContainer container)
Find and return the greediest satisfiable constructor.
|
boolean |
hasLifecycle(Class type) |
protected Object |
newInstance(Constructor constructor,
Object[] parameters)
Instantiate an object with given parameters and respect the accessible
flag.
|
void |
start(Object component) |
void |
stop(Object component) |
void |
verify(org.picocontainer.PicoContainer container) |
checkTypeCompatibility, getComponentImplementation, getComponentKey, toStringprotected transient JdonInstantiatingComponentAdapter.Guard verifyingGuard
protected transient org.picocontainer.Parameter[] parameters
protected boolean allowNonPublicClasses
protected org.picocontainer.defaults.LifecycleStrategy lifecycleStrategy
protected JdonInstantiatingComponentAdapter(Object componentKey, Class componentImplementation, org.picocontainer.Parameter[] parameters, boolean allowNonPublicClasses, org.picocontainer.ComponentMonitor monitor, org.picocontainer.defaults.LifecycleStrategy lifecycleStrategy)
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationparameters - the parameters to use for the initializationallowNonPublicClasses - flag to allow instantiation of non-public classesmonitor - the component monitor used by this ComponentAdapterlifecycleStrategy - the lifecycle strategy used by this ComponentAdapterorg.picocontainer.defaults.AssignabilityRegistrationException - if the key is a type and the implementation cannot be
assigned toorg.picocontainer.defaults.NotConcreteRegistrationException - if the implementation is not a concrete classNullPointerException - if one of the parameters is nullprotected JdonInstantiatingComponentAdapter(Object componentKey, Class componentImplementation, org.picocontainer.Parameter[] parameters, boolean allowNonPublicClasses, org.picocontainer.ComponentMonitor monitor)
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationparameters - the parameters to use for the initializationallowNonPublicClasses - flag to allow instantiation of non-public classesmonitor - the component monitor used by this ComponentAdapterorg.picocontainer.defaults.AssignabilityRegistrationException - if the key is a type and the implementation cannot be
assigned toorg.picocontainer.defaults.NotConcreteRegistrationException - if the implementation is not a concrete classNullPointerException - if one of the parameters is nullprotected org.picocontainer.Parameter[] createDefaultParameters(Class[] parameters)
parameters - the parameter typespublic void verify(org.picocontainer.PicoContainer container)
throws org.picocontainer.PicoIntrospectionException
verify 在接口中 org.picocontainer.ComponentAdapterorg.picocontainer.PicoIntrospectionExceptionpublic void accept(org.picocontainer.PicoVisitor visitor)
accept 在接口中 org.picocontainer.ComponentAdapteraccept 在类中 org.picocontainer.defaults.AbstractComponentAdapterpublic void start(Object component)
start 在接口中 org.picocontainer.defaults.LifecycleStrategypublic void stop(Object component)
stop 在接口中 org.picocontainer.defaults.LifecycleStrategypublic void dispose(Object component)
dispose 在接口中 org.picocontainer.defaults.LifecycleStrategypublic boolean hasLifecycle(Class type)
hasLifecycle 在接口中 org.picocontainer.defaults.LifecycleStrategyprotected Object newInstance(Constructor constructor, Object[] parameters) throws InstantiationException, IllegalAccessException, InvocationTargetException
constructor - the constructor to useparameters - the parameters for the constructorInstantiationExceptionIllegalAccessExceptionInvocationTargetExceptionprotected abstract Constructor getGreediestSatisfiableConstructor(org.picocontainer.PicoContainer container) throws org.picocontainer.PicoIntrospectionException, org.picocontainer.defaults.UnsatisfiableDependenciesException, org.picocontainer.defaults.AmbiguousComponentResolutionException, org.picocontainer.defaults.AssignabilityRegistrationException, org.picocontainer.defaults.NotConcreteRegistrationException
container - the PicoContainer to resolve dependencies.org.picocontainer.PicoIntrospectionExceptionorg.picocontainer.defaults.UnsatisfiableDependenciesExceptionorg.picocontainer.defaults.AmbiguousComponentResolutionExceptionorg.picocontainer.defaults.AssignabilityRegistrationExceptionorg.picocontainer.defaults.NotConcreteRegistrationExceptionpublic void clear()
Copyright © 2018. All rights reserved.