Dashboard Builder Commons 6.0.0.Beta3

org.jboss.dashboard.commons.misc
Class ReflectionUtils

java.lang.Object
  extended by org.jboss.dashboard.commons.misc.ReflectionUtils

public class ReflectionUtils
extends Object


Constructor Summary
ReflectionUtils()
           
 
Method Summary
static List<Field> getClassFields(Class clazz, Class type, boolean isStatic, String[] fieldsToIgnore)
           
static List<Field> getClassHierarchyFields(Class clazz, Class fieldType, boolean isStatic, String[] fieldsToIgnore)
           
static Class[] getClassHierarchyInterfaces(Class clazz)
           
static String getGetMethodName(String fieldName)
          Generates the name of a get method for the given field name.
static Object getPrivateField(Object o, String fieldName)
           
static String getSetMethodName(String fieldName)
          Generates the name of a create method for the given field name.
static Object invokeMethod(Object o, String methodName, Object[] params)
           
static boolean isGetMethod(Method method)
          Checks if the given method is a get method.
static boolean isIsMethod(Method method)
          Checks if the given method is a 'is' method.
static boolean isSetMethod(Method method)
          Checks if the given method is a set method.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

getPrivateField

public static Object getPrivateField(Object o,
                                     String fieldName)

invokeMethod

public static Object invokeMethod(Object o,
                                  String methodName,
                                  Object[] params)

getClassHierarchyFields

public static List<Field> getClassHierarchyFields(Class clazz,
                                                  Class fieldType,
                                                  boolean isStatic,
                                                  String[] fieldsToIgnore)

getClassFields

public static List<Field> getClassFields(Class clazz,
                                         Class type,
                                         boolean isStatic,
                                         String[] fieldsToIgnore)

getClassHierarchyInterfaces

public static Class[] getClassHierarchyInterfaces(Class clazz)

getGetMethodName

public static final String getGetMethodName(String fieldName)
Generates the name of a get method for the given field name.

Parameters:
fieldName - the field name to generate a method name for
Returns:
the generated get method name

getSetMethodName

public static final String getSetMethodName(String fieldName)
Generates the name of a create method for the given field name.

Parameters:
fieldName - the field name to generate a method name for
Returns:
the generated create method name

isSetMethod

public static final boolean isSetMethod(Method method)
Checks if the given method is a set method.

Parameters:
method - the Method to check
Returns:
true if it is a set method

isGetMethod

public static final boolean isGetMethod(Method method)
Checks if the given method is a get method.

Parameters:
method - the Method to check
Returns:
true if it is a get method

isIsMethod

public static final boolean isIsMethod(Method method)
Checks if the given method is a 'is' method.

Parameters:
method - the Method to check
Returns:
true if it is a 'is' method

main

public static void main(String[] args)

Dashboard Builder Commons 6.0.0.Beta3

Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.