[picocontainer-scm] [jira] Created: (PICO-369) generic signature of ComponentAdapter#getComponentImplementation

"Giorgio Gallo (JIRA)" <jira-yCVjj/[email protected]>
Newsgroups gmane.comp.java.picocontainer.cvs
Message-ID <15195834.91311.1266879355164.JavaMail.haus-jira@codehaus01.managed.contegix.com>
generic signature of ComponentAdapter#getComponentImplementation
----------------------------------------------------------------

                 Key: PICO-369
                 URL: http://jira.codehaus.org/browse/PICO-369
             Project: PicoContainer
          Issue Type: Improvement
          Components: PicoContainer (Java)
    Affects Versions: 2.9
            Reporter: Giorgio Gallo
            Priority: Minor


The signature of method ComponentAdapter#getComponentImplementation is currently

Class<T> getComponentImplementation();

To me it feels like

Class<? extends T> getComponentImplementation();

should be used instead, in order to allow (eg) for

public class MyAdapter implements ComponentAdapter<List> {

  private Class<? extends List> implementationclass = ArrayList.class;

  public Class<? extends List> getComponentImplementation() {
    return implementationclass;
  }

  // ...
}

(the above is adapted from a real case I got into while integrating pico with stripes - I want to implement an adapter which resolves to whatever ActionBeanContext class is configured in web.xml and so there is no way I can statically type the T of ComponentAdapter)



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
    <a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.