org.objectweb.telosys.util
Class ClassUtil

java.lang.Object
  extended byorg.objectweb.telosys.util.ClassUtil

public final class ClassUtil
extends java.lang.Object


Method Summary
static java.lang.Object getFieldValue(java.lang.Class cl, java.lang.String sFieldName)
          Return the value of a static field for a given class.
static java.lang.String getSimpleName(java.lang.Class cl)
          Returns the "simple name" of the given class
Just the same as Class.getSimpleName() in Java 5+
e.g. returns "String" for "java.lang.String" class
static java.lang.String getSimpleName(java.lang.String sClassName)
          Returns the "simple name" of the given class name
Just the same as Class.getSimpleName() in Java 5+
e.g. returns "String" for "java.lang.String"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFieldValue

public static java.lang.Object getFieldValue(java.lang.Class cl,
                                             java.lang.String sFieldName)
                                      throws TelosysException
Return the value of a static field for a given class.

Parameters:
cl - : the class
sFieldName - : the field name to find in the class
Returns:
: the field value
Throws:
TelosysException

getSimpleName

public static java.lang.String getSimpleName(java.lang.Class cl)
Returns the "simple name" of the given class
Just the same as Class.getSimpleName() in Java 5+
e.g. returns "String" for "java.lang.String" class

Parameters:
cl -
Returns:

getSimpleName

public static java.lang.String getSimpleName(java.lang.String sClassName)
Returns the "simple name" of the given class name
Just the same as Class.getSimpleName() in Java 5+
e.g. returns "String" for "java.lang.String"

Parameters:
sClassName - the name of the class
Returns: