com.jdon.container.pico
类 JdonInstantiatingComponentAdapter

java.lang.Object
  继承者 org.picocontainer.defaults.MonitoringComponentAdapter
      继承者 org.picocontainer.defaults.AbstractComponentAdapter
          继承者 com.jdon.container.pico.JdonInstantiatingComponentAdapter
所有已实现的接口:
Serializable, org.picocontainer.ComponentAdapter, org.picocontainer.defaults.ComponentMonitorStrategy, org.picocontainer.defaults.LifecycleStrategy
直接已知子类:
JdonConstructorInjectionComponentAdapter

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)
           
 
从类 org.picocontainer.defaults.AbstractComponentAdapter 继承的方法
checkTypeCompatibility, getComponentImplementation, getComponentKey, toString
 
从类 org.picocontainer.defaults.MonitoringComponentAdapter 继承的方法
changeMonitor, currentMonitor
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
从接口 org.picocontainer.ComponentAdapter 继承的方法
getComponentInstance
 

字段详细信息

verifyingGuard

protected transient JdonInstantiatingComponentAdapter.Guard verifyingGuard

parameters

protected transient org.picocontainer.Parameter[] parameters
The parameters to use for initialization.


allowNonPublicClasses

protected boolean allowNonPublicClasses
Flag indicating instanciation of non-public classes.


lifecycleStrategy

protected org.picocontainer.defaults.LifecycleStrategy lifecycleStrategy
The strategy used to control the lifecycle

构造方法详细信息

JdonInstantiatingComponentAdapter

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.

参数:
componentKey - the search key for this implementation
componentImplementation - the concrete implementation
parameters - the parameters to use for the initialization
allowNonPublicClasses - flag to allow instantiation of non-public classes
monitor - the component monitor used by this ComponentAdapter
lifecycleStrategy - the lifecycle strategy used by this ComponentAdapter
抛出:
org.picocontainer.defaults.AssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to
org.picocontainer.defaults.NotConcreteRegistrationException - if the implementation is not a concrete class
NullPointerException - if one of the parameters is null

JdonInstantiatingComponentAdapter

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.

参数:
componentKey - the search key for this implementation
componentImplementation - the concrete implementation
parameters - the parameters to use for the initialization
allowNonPublicClasses - flag to allow instantiation of non-public classes
monitor - the component monitor used by this ComponentAdapter
抛出:
org.picocontainer.defaults.AssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to
org.picocontainer.defaults.NotConcreteRegistrationException - if the implementation is not a concrete class
NullPointerException - if one of the parameters is null

JdonInstantiatingComponentAdapter

protected JdonInstantiatingComponentAdapter(Object componentKey,
                                            Class componentImplementation,
                                            org.picocontainer.Parameter[] parameters,
                                            boolean allowNonPublicClasses)
方法详细信息

createDefaultParameters

protected org.picocontainer.Parameter[] createDefaultParameters(Class[] parameters)
Create default parameters for the given types.

参数:
parameters - the parameter types
返回:
the array with the default parameters.

verify

public void verify(org.picocontainer.PicoContainer container)
            throws org.picocontainer.PicoIntrospectionException
指定者:
接口 org.picocontainer.ComponentAdapter 中的 verify
抛出:
org.picocontainer.PicoIntrospectionException

accept

public void accept(org.picocontainer.PicoVisitor visitor)
指定者:
接口 org.picocontainer.ComponentAdapter 中的 accept
覆盖:
org.picocontainer.defaults.AbstractComponentAdapter 中的 accept

start

public void start(Object component)
指定者:
接口 org.picocontainer.defaults.LifecycleStrategy 中的 start

stop

public void stop(Object component)
指定者:
接口 org.picocontainer.defaults.LifecycleStrategy 中的 stop

dispose

public void dispose(Object component)
指定者:
接口 org.picocontainer.defaults.LifecycleStrategy 中的 dispose

hasLifecycle

public boolean hasLifecycle(Class type)
指定者:
接口 org.picocontainer.defaults.LifecycleStrategy 中的 hasLifecycle

newInstance

protected Object newInstance(Constructor constructor,
                             Object[] parameters)
                      throws InstantiationException,
                             IllegalAccessException,
                             InvocationTargetException
Instantiate an object with given parameters and respect the accessible flag.

参数:
constructor - the constructor to use
parameters - the parameters for the constructor
返回:
the new object.
抛出:
InstantiationException
IllegalAccessException
InvocationTargetException

getGreediestSatisfiableConstructor

protected 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
Find and return the greediest satisfiable constructor.

参数:
container - the PicoContainer to resolve dependencies.
返回:
the found constructor.
抛出:
org.picocontainer.PicoIntrospectionException
org.picocontainer.defaults.UnsatisfiableDependenciesException
org.picocontainer.defaults.AmbiguousComponentResolutionException
org.picocontainer.defaults.AssignabilityRegistrationException
org.picocontainer.defaults.NotConcreteRegistrationException

clear

public void clear()


Copyright © 2013. All Rights Reserved.