Uses of Interface
org.picocontainer.Parameter

Packages that use Parameter
org.picocontainer This package contains the core API for PicoContainer, a compact container for working with the dependency injection pattern. 
org.picocontainer.alternatives   
org.picocontainer.defaults This package contains the default implementation of the PicoContainer API. 
 

Uses of Parameter in org.picocontainer
 

Methods in org.picocontainer with parameters of type Parameter
 ComponentAdapter MutablePicoContainer.registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Register a component and creates specific instructions on which constructor to use, along with which components and/or constants to provide as constructor arguments.
 void PicoVisitor.visitParameter(Parameter parameter)
          Visit a Parameter that has to accept the visitor.
 

Uses of Parameter in org.picocontainer.alternatives
 

Methods in org.picocontainer.alternatives with parameters of type Parameter
 ComponentAdapter AbstractDelegatingMutablePicoContainer.registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 

Uses of Parameter in org.picocontainer.defaults
 

Classes in org.picocontainer.defaults that implement Parameter
 class BasicComponentParameter
          A BasicComponentParameter should be used to pass in a particular component as argument to a different component's constructor.
 class CollectionComponentParameter
          A CollectionComponentParameter should be used to support inject an Array, a Collectionor Mapof components automatically.
 class ComponentParameter
          A ComponentParameter should be used to pass in a particular component as argument to a different component's constructor.
 class ConstantParameter
          A ConstantParameter should be used to pass in "constant" arguments to constructors.
 

Fields in org.picocontainer.defaults declared as Parameter
protected  Parameter[] InstantiatingComponentAdapter.parameters
          The parameters to use for initialization.
 

Methods in org.picocontainer.defaults that return Parameter
protected  Parameter[] InstantiatingComponentAdapter.createDefaultParameters(Class[] parameters)
          Create default parameters for the given types.
 

Methods in org.picocontainer.defaults with parameters of type Parameter
 ComponentAdapter ImplementationHidingComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 ComponentAdapter SetterInjectionComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Create a SetterInjectionComponentAdapter.
 ComponentAdapter DefaultComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 ComponentAdapter ComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Create a new component adapter based on the specified arguments.
 ComponentAdapter DecoratingComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 ComponentAdapter BeanPropertyComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          
 ComponentAdapter ConstructorInjectionComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 ComponentAdapter DefaultPicoContainer.registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Register a component and creates specific instructions on which constructor to use, along with which components and/or constants to provide as constructor arguments. These "directives" are provided through an array of Parameter objects. Parameter[0] correspondes to the first constructor argument, Parameter[N] corresponds to the N+1th constructor argument.

Tips for Parameter usage

  • Partial Autowiring: If you have two constructor args to match and you only wish to specify one of the constructors and let PicoContainer wire the other one, you can use: new Parameter[]{new ComponentParameter(), new ComponentParameter("someService"} The default constructor for the component parameter indicates auto-wiring should take place for that parameter.
  • Force No-Arg constructor usage: If you wish to force a component to be constructed with the no-arg constructor, use a zero length Parameter array. Ex: new Parameter[] {}
      The returned ComponentAdapter will be instantiated by the ComponentAdapterFactory passed to the container's constructor.
 ComponentAdapter CachingComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 void TraversalCheckingVisitor.visitParameter(Parameter parameter)
           
 ComponentAdapter SynchronizedComponentAdapterFactory.createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 

Constructors in org.picocontainer.defaults with parameters of type Parameter
SetterInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses, ComponentMonitor monitor, LifecycleStrategy lifecycleStrategy)
          Constructs a SetterInjectionComponentAdapter
SetterInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses, ComponentMonitor monitor)
          Constructs a SetterInjectionComponentAdapter
SetterInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses)
          Constructs a SetterInjectionComponentAdapter with a DelegatingComponentMonitor as default.
SetterInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Constructs a SetterInjectionComponentAdapter with key, implementation and parameters.
ConstructorInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses, ComponentMonitor monitor, LifecycleStrategy lifecycleStrategy)
          Creates a ConstructorInjectionComponentAdapter
ConstructorInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses, ComponentMonitor monitor)
          Creates a ConstructorInjectionComponentAdapter
ConstructorInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses)
          Creates a ConstructorInjectionComponentAdapter
ConstructorInjectionComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Creates a ConstructorInjectionComponentAdapter with key, implementation and parameters
InstantiatingComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses, ComponentMonitor monitor, LifecycleStrategy lifecycleStrategy)
          Constructs a new ComponentAdapter for the given key and implementation.
InstantiatingComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses, ComponentMonitor monitor)
          Constructs a new ComponentAdapter for the given key and implementation.
InstantiatingComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters, boolean allowNonPublicClasses)
          Constructs a new ComponentAdapter for the given key and implementation.
 



Copyright © 2003-2007 Codehaus. All Rights Reserved.