Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PicoContainer (Java)
    • Labels:
      None
    • Number of attachments :
      2

      Description

      From Chris Nokleberg:

      It's no secret that I dislike Type-3 (see my blog) but the more people
      who use CGLIB the better, so here you go. Compiles against CGLIB CVS.

      The generated code is close to what Paul suggested. The main difference
      is that the component initialization is done as soon as the first
      interface method is called. (BTW I've used BeanMap here to set the
      properties just as a convenience...it really is a genuine bean)

      One issue with this is that you have to derive the bean property names
      from the names of the classes in the constructor, since the actual
      argument names aren't available. I strip off the package name and
      anything before '$' if it is an inner class.

      Chris

      1. PicoBeanAdapter.java
        4 kB
        Aslak Hellesøy
      2. PicoTest.java
        1 kB
        Aslak Hellesøy

        Activity

        Hide
        Aslak Hellesøy added a comment -

        The "test", although it would have been better to have a proper JUnit test...

        Show
        Aslak Hellesøy added a comment - The "test", although it would have been better to have a proper JUnit test...
        Aslak Hellesøy made changes -
        Field Original Value New Value
        Attachment PicoTest.java [ 10443 ]
        Aslak Hellesøy made changes -
        Attachment PicoBeanAdapter.java [ 10444 ]
        Aslak Hellesøy made changes -
        Fix Version/s 2.0 [ 10411 ]
        Component/s Core (Java) [ 10191 ]
        Environment
        Component/s picoextras [ 10601 ]
        Hide
        Aslak Hellesøy added a comment -

        There is no integration of PicoContainer in this code and I don't see how it's related to PicoContainer at all.

        Show
        Aslak Hellesøy added a comment - There is no integration of PicoContainer in this code and I don't see how it's related to PicoContainer at all.
        Aslak Hellesøy made changes -
        Resolution Won't Fix [ 2 ]
        Fix Version/s 2.0 [ 10411 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Aslak Hellesøy
            Reporter:
            Aslak Hellesøy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: