You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Trevor Charles Miller (JIRA)" <ji...@apache.org> on 2006/10/06 07:14:19 UTC

[jira] Created: (BEANUTILS-248) Code to create a JavaBean and set its properties from a Java Properties instance

Code to create a JavaBean and set its properties from a Java Properties instance
--------------------------------------------------------------------------------

                 Key: BEANUTILS-248
                 URL: http://issues.apache.org/jira/browse/BEANUTILS-248
             Project: Commons BeanUtils
          Issue Type: Improvement
         Environment: Coded on Windows XP professional with Netbean 5.5 Beta 2 using JDK 1.5.0
            Reporter: Trevor Charles Miller
            Priority: Minor


The idea is simple and I've seen this done in Log4J and had a use case for it myself in another project. Given a set of properties, create an instance of a specified class and set properties on it. I think this could be very useful for runtime configuration.

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

        

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


[jira] Commented: (BEANUTILS-248) Code to create a JavaBean and set its properties from a Java Properties instance

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/BEANUTILS-248?page=comments#action_12449893 ] 
            
Henri Yandell commented on BEANUTILS-248:
-----------------------------------------

    public Object populateNewInstance(Class beanClass, Map properties) {
        Class beanClass = Class.forName(className);   // TODO: ContextClassLoader?
        Object bean = beanClass.newInstance();
        populate(bean, properties);
        return bean;
    }

> Code to create a JavaBean and set its properties from a Java Properties instance
> --------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-248
>                 URL: http://issues.apache.org/jira/browse/BEANUTILS-248
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>         Environment: Coded on Windows XP professional with Netbean 5.5 Beta 2 using JDK 1.5.0
>            Reporter: Trevor Charles Miller
>            Priority: Minor
>             Fix For: 1.8.0
>
>         Attachments: BeanCreator.java
>
>
> The idea is simple and I've seen this done in Log4J and had a use case for it myself in another project. Given a set of properties, create an instance of a specified class and set properties on it. I think this could be very useful for runtime configuration.

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

        

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


[jira] Updated: (BEANUTILS-248) Code to create a JavaBean and set its properties from a Java Properties instance

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/BEANUTILS-248?page=all ]

Henri Yandell updated BEANUTILS-248:
------------------------------------

    Fix Version/s: 1.8.0

Map -> Bean seems useful, so putting in 1.8.0 - however might get punted to a later version if we decide we don't want big new features in there.

> Code to create a JavaBean and set its properties from a Java Properties instance
> --------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-248
>                 URL: http://issues.apache.org/jira/browse/BEANUTILS-248
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>         Environment: Coded on Windows XP professional with Netbean 5.5 Beta 2 using JDK 1.5.0
>            Reporter: Trevor Charles Miller
>            Priority: Minor
>             Fix For: 1.8.0
>
>         Attachments: BeanCreator.java
>
>
> The idea is simple and I've seen this done in Log4J and had a use case for it myself in another project. Given a set of properties, create an instance of a specified class and set properties on it. I think this could be very useful for runtime configuration.

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

        

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


[jira] Updated: (BEANUTILS-248) Code to create a JavaBean and set its properties from a Java Properties instance

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEANUTILS-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton updated BEANUTILS-248:
--------------------------------------

    Fix Version/s:     (was: 1.8.0)
                   LATER THAN 1.8.0

> Code to create a JavaBean and set its properties from a Java Properties instance
> --------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-248
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-248
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>         Environment: Coded on Windows XP professional with Netbean 5.5 Beta 2 using JDK 1.5.0
>            Reporter: Trevor Charles Miller
>            Priority: Minor
>             Fix For: LATER THAN 1.8.0
>
>         Attachments: BeanCreator.java
>
>
> The idea is simple and I've seen this done in Log4J and had a use case for it myself in another project. Given a set of properties, create an instance of a specified class and set properties on it. I think this could be very useful for runtime configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (BEANUTILS-248) Code to create a JavaBean and set its properties from a Java Properties instance

Posted by "Trevor Charles Miller (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/BEANUTILS-248?page=all ]

Trevor Charles Miller updated BEANUTILS-248:
--------------------------------------------

    Attachment: BeanCreator.java

The code gives an idea of how this could be implemented, i have tested it very briefly but it should be considered as a proof of concept and should be improved / optimized.

> Code to create a JavaBean and set its properties from a Java Properties instance
> --------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-248
>                 URL: http://issues.apache.org/jira/browse/BEANUTILS-248
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>         Environment: Coded on Windows XP professional with Netbean 5.5 Beta 2 using JDK 1.5.0
>            Reporter: Trevor Charles Miller
>            Priority: Minor
>         Attachments: BeanCreator.java
>
>
> The idea is simple and I've seen this done in Log4J and had a use case for it myself in another project. Given a set of properties, create an instance of a specified class and set properties on it. I think this could be very useful for runtime configuration.

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

        

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


[jira] Updated: (BEANUTILS-248) Code to create a JavaBean and set its properties from a Java Properties instance

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/BEANUTILS-248?page=all ]

Niall Pemberton updated BEANUTILS-248:
--------------------------------------

    Component/s: Utils (Bean, Property, Method)

> Code to create a JavaBean and set its properties from a Java Properties instance
> --------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-248
>                 URL: http://issues.apache.org/jira/browse/BEANUTILS-248
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Utils (Bean, Property, Method)
>         Environment: Coded on Windows XP professional with Netbean 5.5 Beta 2 using JDK 1.5.0
>            Reporter: Trevor Charles Miller
>            Priority: Minor
>         Attachments: BeanCreator.java
>
>
> The idea is simple and I've seen this done in Log4J and had a use case for it myself in another project. Given a set of properties, create an instance of a specified class and set properties on it. I think this could be very useful for runtime configuration.

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

        

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


[jira] Commented: (BEANUTILS-248) Code to create a JavaBean and set its properties from a Java Properties instance

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/BEANUTILS-248?page=comments#action_12449891 ] 
            
Henri Yandell commented on BEANUTILS-248:
-----------------------------------------

Easy enough, means adding a populateNewInstance(Class beanClass, Map values) to BeanUtils and BeanUtilsBean.

> Code to create a JavaBean and set its properties from a Java Properties instance
> --------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-248
>                 URL: http://issues.apache.org/jira/browse/BEANUTILS-248
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>         Environment: Coded on Windows XP professional with Netbean 5.5 Beta 2 using JDK 1.5.0
>            Reporter: Trevor Charles Miller
>            Priority: Minor
>             Fix For: 1.8.0
>
>         Attachments: BeanCreator.java
>
>
> The idea is simple and I've seen this done in Log4J and had a use case for it myself in another project. Given a set of properties, create an instance of a specified class and set properties on it. I think this could be very useful for runtime configuration.

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

        

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