PicoContainer
  1. PicoContainer
  2. PICO-181

refactor creation of default parameters

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.0-beta-5
    • Fix Version/s: 2.8
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Currently the creation of the default parameters is hard-wired in ICA.createDefaultParameters(). We had now 3 issues on the list, where another Parameter-Implementation instead of ComponentParameter would have been better:

      Configuration aware (Julian Stern's problem):

      We might either move createDefaultParameter to (Mutable)PicoContainer or to create a container that overwrites the fucntion or have an additional ctor arg for ICA:

      class ICA {
      public ICA(Object componentKey, Class componentImplementation, Parameter[] parameters, ParameterFactory factory)

      { ... }

      public ICA(Object componentKey, Class componentImplementation, Parameter[] parameters)

      { this(comüponentKey, componentImplementation, parameters, new DefaultParameterFactory()) }

      }

      class ParameterFactory() {
      Parameter getDefaultParaeterForType(Class type);
      }

        Issue Links

          Activity

          Aslak Hellesøy made changes -
          Field Original Value New Value
          Fix Version/s 1.0 [ 10423 ]
          Fix Version/s 1.0.1 [ 10307 ]
          Summary refactore creation of default parameters refactor creation of default parameters
          Hide
          Jörg Schaible added a comment -

          PROPOSAL:
          ========

          Add a ParameterFactory as optional Parameter to DefaultPC and create the method PicoContainer.createDefaultParameter(Class type).

          BENEFIT:
          ========

          • User can influence or completly change the strategy for selecting the default parameters. With PICO-216 he can turn off collections, with Thomas' AutoConfigParameter he can use a configuration as default or with Nick's constraints PICO-206 create even more sophisticated strategies.
          Show
          Jörg Schaible added a comment - PROPOSAL: ======== Add a ParameterFactory as optional Parameter to DefaultPC and create the method PicoContainer.createDefaultParameter(Class type). BENEFIT: ======== User can influence or completly change the strategy for selecting the default parameters. With PICO-216 he can turn off collections, with Thomas' AutoConfigParameter he can use a configuration as default or with Nick's constraints PICO-206 create even more sophisticated strategies.
          Jörg Schaible made changes -
          Link This issue is related to PICO-216 [ PICO-216 ]
          Jörg Schaible made changes -
          Link This issue is related to PICO-206 [ PICO-206 ]
          Hide
          Paul Hammant added a comment -

          I'd prefer a ParameterizedPicoContainer or ParameterizingPicoContainer. Somewhere where we would move perhaps all component-parameter functionality to.

          Show
          Paul Hammant added a comment - I'd prefer a ParameterizedPicoContainer or ParameterizingPicoContainer. Somewhere where we would move perhaps all component-parameter functionality to.
          Jörg Schaible made changes -
          Fix Version/s 1.2 [ 11330 ]
          Environment
          Fix Version/s 1.3 [ 11331 ]
          Jörg Schaible made changes -
          Link This issue depends upon PICO-268 [ PICO-268 ]
          Hide
          Jörg Schaible added a comment -

          Note, this is scheduled for 1.3

          Show
          Jörg Schaible added a comment - Note, this is scheduled for 1.3
          Jörg Schaible made changes -
          Link This issue depends upon PICO-268 [ PICO-268 ]
          Jörg Schaible made changes -
          Link This issue is related to PICO-268 [ PICO-268 ]
          Hide
          Jörg Schaible added a comment -

          Fix relationship.

          Show
          Jörg Schaible added a comment - Fix relationship.
          Michael Rimov made changes -
          Fix Version/s 1.3 [ 11331 ]
          Fix Version/s 2.3 [ 14303 ]
          Michael Rimov made changes -
          Fix Version/s 2.4 [ 14362 ]
          Fix Version/s 2.3 [ 14303 ]
          Michael Rimov made changes -
          Fix Version/s 2.4 [ 14362 ]
          Fix Version/s 2.5 [ 14424 ]
          Mauro Talevi made changes -
          Fix Version/s 2.5 [ 14424 ]
          Fix Version/s 2.6 [ 14481 ]
          Michael Rimov made changes -
          Fix Version/s 2.7 [ 14663 ]
          Fix Version/s 2.6 [ 14481 ]
          Michael Rimov made changes -
          Fix Version/s 2.7 [ 14663 ]
          Fix Version/s 2.8 [ 14920 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Jörg Schaible
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: