org.acegisecurity.util
Class FieldUtils

java.lang.Object
  extended by org.acegisecurity.util.FieldUtils

public class FieldUtils
extends Object

Offers static methods for directly manipulating static fields.

Version:
$Id: FieldUtils.java 1755 2006-11-17 02:03:23Z benalex $
Author:
Ben Alex

Constructor Summary
FieldUtils()
           
 
Method Summary
static String getAccessorName(String fieldName, Class type)
           
static Field getField(Class clazz, String fieldName)
          Attempts to locate the specified field on the class.
static String getMutatorName(String fieldName)
           
static Object getProtectedFieldValue(String protectedField, Object object)
           
static void setProtectedFieldValue(String protectedField, Object object, Object newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldUtils

public FieldUtils()
Method Detail

getAccessorName

public static String getAccessorName(String fieldName,
                                     Class type)

getField

public static Field getField(Class clazz,
                             String fieldName)
                      throws IllegalStateException
Attempts to locate the specified field on the class.

Parameters:
clazz - the class definition containing the field
fieldName - the name of the field to locate
Returns:
the Field (never null)
Throws:
IllegalStateException - if field could not be found

getMutatorName

public static String getMutatorName(String fieldName)

getProtectedFieldValue

public static Object getProtectedFieldValue(String protectedField,
                                            Object object)

setProtectedFieldValue

public static void setProtectedFieldValue(String protectedField,
                                          Object object,
                                          Object newValue)


Copyright © 2004-2006 Acegi Technology Pty Limited. All Rights Reserved.