org.jboss.portal.common.reflect
Class Modifier

java.lang.Object
  extended by java.lang.reflect.Modifier
      extended by org.jboss.portal.common.reflect.Modifier

public class Modifier
extends java.lang.reflect.Modifier

Extends the java Modifier object in order to add more utility methods.

Version:
$Revision: 7228 $
Author:
Julien Viet

Field Summary
 
Fields inherited from class java.lang.reflect.Modifier
ABSTRACT, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, TRANSIENT, VOLATILE
 
Constructor Summary
Modifier()
           
 
Method Summary
static boolean isReadableProperty(java.lang.reflect.Field f)
          Return true if the field is considered as a readable property which means that it is public and non static.
static boolean isWritableProperty(java.lang.reflect.Field f)
          Return true if the field is considered as a writable property which means that it is public, non static and non final.
 
Methods inherited from class java.lang.reflect.Modifier
isAbstract, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Modifier

public Modifier()
Method Detail

isReadableProperty

public static boolean isReadableProperty(java.lang.reflect.Field f)
                                  throws java.lang.IllegalArgumentException
Return true if the field is considered as a readable property which means that it is public and non static.

Parameters:
f - the field to test
Returns:
true if the field is a readable property
Throws:
java.lang.IllegalArgumentException - if the field argument is null

isWritableProperty

public static boolean isWritableProperty(java.lang.reflect.Field f)
Return true if the field is considered as a writable property which means that it is public, non static and non final.

Parameters:
f - the field to test
Returns:
true if the field is a writable property
Throws:
java.lang.IllegalArgumentException - if the field argument is null