org.codehaus.plexus.util
Class ReflectionUtils

java.lang.Object
  extended by org.codehaus.plexus.util.ReflectionUtils

public final class ReflectionUtils
extends java.lang.Object

Version:
$Id: ReflectionUtils.java 2402 2005-08-15 23:33:05Z kenney $
Author:
Michal Maczka

Method Summary
static java.lang.reflect.Field getFieldByNameIncludingSuperclasses(java.lang.String fieldName, java.lang.Class clazz)
           
static java.lang.reflect.Method getSetter(java.lang.String fieldName, java.lang.Class clazz)
          Finds a setter in the given class for the given field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFieldByNameIncludingSuperclasses

public static java.lang.reflect.Field getFieldByNameIncludingSuperclasses(java.lang.String fieldName,
                                                                          java.lang.Class clazz)

getSetter

public static java.lang.reflect.Method getSetter(java.lang.String fieldName,
                                                 java.lang.Class clazz)
Finds a setter in the given class for the given field. It searches interfaces and superclasses too.

Parameters:
fieldName - the name of the field (i.e. 'fooBar'); it will search for a method named 'setFooBar'.
object - The class to find the method in.
Returns:
null or the method found.


Copyright 2001-2006 Codehaus. All Rights Reserved.