You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "china m.t.xiatian 11602011 (JIRA)" <ji...@apache.org> on 2008/11/12 15:17:44 UTC

[jira] Created: (BEANUTILS-329) get return for a Object

get return for a Object
-----------------------

                 Key: BEANUTILS-329
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-329
             Project: Commons BeanUtils
          Issue Type: Improvement
          Components: Bean / Property Utils
    Affects Versions: 1.8.0-BETA
         Environment: eclipse,tomcat
            Reporter: china m.t.xiatian 11602011
             Fix For: Nightly Builds


{code}
// X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 start
	public static Object getPropertyForObject(Object bean, String name)
			throws IllegalAccessException, InvocationTargetException,
			NoSuchMethodException {
		return BeanUtilsBean.getInstance().getPropertyForObject(bean, name);
	}
  // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 end
{code}

{code}
// X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 start
	public Object getNestedPropertyForObject(Object bean, String name)
			throws IllegalAccessException, InvocationTargetException,
			NoSuchMethodException {
		return getPropertyUtils().getNestedProperty(bean, name);
	}
	public Object getPropertyForObject(Object bean, String name)
			throws IllegalAccessException, InvocationTargetException,
			NoSuchMethodException {
		return (getNestedPropertyForObject(bean, name));
	}
    // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 end

{code}

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


[jira] Commented: (BEANUTILS-329) get return for a Object

Posted by china, "//www.china-pub.com/39669 (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646914#action_12646914 ] 

china m.t.xiatian 11602011,my book's《JavaScript高级应用与实践》http://www.china-pub.com/39669 commented on BEANUTILS-329:
-----------------------------------------------------------------------------------------------------------------

so :
{code}
Map map = new HashMap();
map.put("key", new Integer(34));

Object obj = BeanUtils.getPropertyForObject(map, "key");
{code}

> get return for a Object
> -----------------------
>
>                 Key: BEANUTILS-329
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-329
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.0-BETA
>         Environment: eclipse,tomcat
>            Reporter: china m.t.xiatian 11602011,my book's《JavaScript高级应用与实践》http://www.china-pub.com/39669
>             Fix For: Nightly Builds
>
>   Original Estimate: 2400h
>  Remaining Estimate: 2400h
>
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 start
> 	public static Object getPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return BeanUtilsBean.getInstance().getPropertyForObject(bean, name);
> 	}
>   // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 end
> {code}
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 start
> 	public Object getNestedPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return getPropertyUtils().getNestedProperty(bean, name);
> 	}
> 	public Object getPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return (getNestedPropertyForObject(bean, name));
> 	}
>     // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 end
> {code}

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


[jira] Resolved: (BEANUTILS-329) get return for a Object

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

Niall Pemberton resolved BEANUTILS-329.
---------------------------------------

    Resolution: Won't Fix

> get return for a Object
> -----------------------
>
>                 Key: BEANUTILS-329
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-329
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.0-BETA
>         Environment: eclipse,tomcat
>            Reporter: china m.t.xiatian 11602011,my book's《JavaScript高级应用与实践》http://www.china-pub.com/39669
>             Fix For: Nightly Builds
>
>   Original Estimate: 2400h
>  Remaining Estimate: 2400h
>
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 start
> 	public static Object getPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return BeanUtilsBean.getInstance().getPropertyForObject(bean, name);
> 	}
>   // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 end
> {code}
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 start
> 	public Object getNestedPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return getPropertyUtils().getNestedProperty(bean, name);
> 	}
> 	public Object getPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return (getNestedPropertyForObject(bean, name));
> 	}
>     // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 end
> {code}

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


[jira] Commented: (BEANUTILS-329) get return for a Object

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647452#action_12647452 ] 

Niall Pemberton commented on BEANUTILS-329:
-------------------------------------------

I must be missing something - why do you want to add two new methods to BeanUtils that just delegate to existing methods in PropertyUtils?

Why can't you just use that method directly?

{code}
               Object obj = PropertyUtils.getNestedProperty(bean, name);
{code}

> get return for a Object
> -----------------------
>
>                 Key: BEANUTILS-329
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-329
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.0-BETA
>         Environment: eclipse,tomcat
>            Reporter: china m.t.xiatian 11602011,my book's《JavaScript高级应用与实践》http://www.china-pub.com/39669
>             Fix For: Nightly Builds
>
>   Original Estimate: 2400h
>  Remaining Estimate: 2400h
>
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 start
> 	public static Object getPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return BeanUtilsBean.getInstance().getPropertyForObject(bean, name);
> 	}
>   // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 11602011 end
> {code}
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 start
> 	public Object getNestedPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return getPropertyUtils().getNestedProperty(bean, name);
> 	}
> 	public Object getPropertyForObject(Object bean, String name)
> 			throws IllegalAccessException, InvocationTargetException,
> 			NoSuchMethodException {
> 		return (getNestedPropertyForObject(bean, name));
> 	}
>     // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china m.t.xiatian 11602011 end
> {code}

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