KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > arooa > reflect > BeanUtilsHelper


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.arooa.reflect;
5
6 import org.apache.commons.beanutils.BeanUtilsBean;
7
8 /**
9  * BeanUtils without the Excpetions.
10  */

11 public class BeanUtilsHelper {
12
13     private static BeanUtilsBeanHelper instance =
14         new BeanUtilsBeanHelper(BeanUtilsBean.getInstance());
15     
16     public static void setProperty(Object JavaDoc bean, String JavaDoc name, Object JavaDoc value) {
17         instance.setProperty(bean, name, value);
18     }
19
20     public static void setMappedProperty(Object JavaDoc bean, String JavaDoc name, String JavaDoc key, Object JavaDoc value) {
21         instance.setMappedProperty(bean, name, key, value);
22     }
23
24     public static Class JavaDoc getPropertyType(Object JavaDoc bean, String JavaDoc name) {
25         return instance.getPropertyType(bean, name);
26     }
27     public static Object JavaDoc getProperty(Object JavaDoc bean, String JavaDoc name) {
28         return instance.getProperty(bean, name);
29     }
30     
31     public static Object JavaDoc getProperty(Object JavaDoc bean, String JavaDoc name, Class JavaDoc required) {
32         return instance.getProperty(bean, name, required);
33     }
34 }
35
Popular Tags