net.sf.beanform.util
Class ReflectionUtils

java.lang.Object
  extended by net.sf.beanform.util.ReflectionUtils

public final class ReflectionUtils
extends Object

Utility class for reflection-related operations.

Author:
Daniel Gredler

Method Summary
static Field getField(Class clazz, String... names)
           
static Object getFieldValue(Object object, String fieldName)
           
static PropertyDescriptor getPropertyDescriptor(Class clazz, String... names)
           
static Object getPropertyValue(Object object, String... names)
           
static void setFieldValue(Object object, String fieldName, Object value)
           
static void setPropertyValue(Object value, Object object, String... names)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setFieldValue

public static void setFieldValue(Object object,
                                 String fieldName,
                                 Object value)
                          throws NoSuchFieldException,
                                 IllegalAccessException
Throws:
NoSuchFieldException
IllegalAccessException

getFieldValue

public static Object getFieldValue(Object object,
                                   String fieldName)
                            throws NoSuchFieldException,
                                   IllegalAccessException
Throws:
NoSuchFieldException
IllegalAccessException

getField

public static Field getField(Class clazz,
                             String... names)
                      throws NoSuchFieldException
Throws:
NoSuchFieldException

getPropertyValue

public static Object getPropertyValue(Object object,
                                      String... names)
                               throws IllegalAccessException,
                                      InvocationTargetException
Throws:
IllegalAccessException
InvocationTargetException

setPropertyValue

public static void setPropertyValue(Object value,
                                    Object object,
                                    String... names)
                             throws IllegalAccessException,
                                    InvocationTargetException,
                                    InstantiationException
Throws:
IllegalAccessException
InvocationTargetException
InstantiationException

getPropertyDescriptor

public static PropertyDescriptor getPropertyDescriptor(Class clazz,
                                                       String... names)


Copyright © 2005-2008 SourceForge.net. All Rights Reserved.