commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18087] New: - Add BeanFactory class for dynamic factories.
Date Tue, 18 Mar 2003 03:08:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18087>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18087

Add BeanFactory class for dynamic factories.

           Summary: Add BeanFactory class for dynamic factories.
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: dgraham@apache.org


I have developed a utility class called ObjectFactory that allows you to 
configure a dynamic factory.  You provide it a Map of logical names to fully 
qualified class names and it will create objects of that type for that name.


Example Usage:


ObjectFactory factory = new ObjectFactory(myMap);


try{


   Set set = (Set)factory.create("my name for set");


} catch (FactoryException e) {// error handling}




BeanUtils might be a good home for this class with a name change to BeanFactory. 
 I am willing to support this and supporting classes if adopted into BeanUtils.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message