PicoContainer
  1. PicoContainer
  2. PICO-49

Change registerComponentInstance to be more flexible

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-3
    • Fix Version/s: 1.0-beta-3
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Environment:
      N/A
    • Number of attachments :
      0

      Description

      Change "public void registerComponentInstance(Object component)" in MuteablePicoContainer to "public Object registerComponentInstance(Object component)" in such a way that the return value is the key under which the component has been registered. This allows for multipleways to register instances and doesn't force any assumptions on under which key the instance is registered. The user shouldn't have know that the instance internally is the registered as the class. Instead we could return him the key and he can use it for what ever he/she wishes.

        Activity

        Hide
        Jeppe Cramon added a comment -

        Forgot, we should change "public void registerComponentImplementation(Class componentImplementation)" to "public Object registerComponentImplementation(Class componentImplementation)" so it follows the same pattern.

        Show
        Jeppe Cramon added a comment - Forgot, we should change "public void registerComponentImplementation(Class componentImplementation)" to "public Object registerComponentImplementation(Class componentImplementation)" so it follows the same pattern.
        Aslak Hellesøy made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Unassigned [ 1 ] Closed [ 6 ]
        Fix Version/s 1.0 [ 10145 ]
        Aslak Hellesøy made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Aslak Hellesøy made changes -
        Affects Version/s 1.0-beta-3 [ 10232 ]
        Fix Version/s 1.0-beta-3 [ 10232 ]
        Fix Version/s 1.0 [ 10145 ]
        Aslak Hellesøy made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeppe Cramon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 minutes
              2m
              Remaining:
              Remaining Estimate - 2 minutes
              2m
              Logged:
              Time Spent - Not Specified
              Not Specified