Class BasicComponentParameter

  • All Implemented Interfaces:
    Serializable, Parameter
    Direct Known Subclasses:
    ComponentParameter

    public class BasicComponentParameter
    extends AbstractParameter
    implements Parameter, Serializable
    A BasicComponentParameter should be used to pass in a particular component as argument to a different component's constructor. This is particularly useful in cases where several components of the same type have been registered, but with a different key. Passing a ComponentParameter as a parameter when registering a component will give PicoContainer a hint about what other component to use in the constructor. This Parameter will never resolve against a collecting type, that is not directly registered in the PicoContainer itself.
    See Also:
    Serialized Form
    • Field Detail

      • BASIC_DEFAULT

        public static final BasicComponentParameter BASIC_DEFAULT
        BASIC_DEFAULT is an instance of BasicComponentParameter using the default constructor.
    • Constructor Detail

      • BasicComponentParameter

        public BasicComponentParameter​(Object componentKey)
        Expect a parameter matching a component of a specific key.
        Parameters:
        componentKey - the key of the desired addComponent
      • BasicComponentParameter

        public BasicComponentParameter()
        Expect any parameter of the appropriate type.