You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Xin Meng (JIRA)" <ji...@apache.org> on 2016/11/11 18:17:58 UTC

[jira] [Created] (BEANUTILS-499) Use standard properties in DyanBean

Xin Meng created BEANUTILS-499:
----------------------------------

             Summary: Use standard properties in DyanBean
                 Key: BEANUTILS-499
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-499
             Project: Commons BeanUtils
          Issue Type: Wish
          Components: DynaBean
    Affects Versions: 1.9.2
            Reporter: Xin Meng


According to read the source code, there are a lot of util method do the job based on different type of bean. Such as 
      public void copyProperties(Object dest, Object orig)
if dynamic bean, copy property in dynamic class
if standard bean. copy property except "class"

Is it possible to mix the standard bean and dynamic bean? That means there are standard propertied in the dynamic bean. For current utils, these properties will not be processed. 

Because if the bean is dynamic, 
            DynaProperty[] origDescriptors =
                ((DynaBean) orig).getDynaClass().getDynaProperties();
if standard bean:
            PropertyDescriptor[] origDescriptors =
                getPropertyDescriptors(orig);

I have tried to override these methods and according to my experience, this is not very difficult.  But is there any principle or some consideration for this design? or is there any more good solution so solve my requirement?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)