Class ClassUtils

java.lang.Object
eu.europa.ec.taxud.validation.utils.ClassUtils

public final class ClassUtils extends Object
Provides useful stuff to handle object through reflection.
Version:
$Revision$
  • Method Details

    • getClassByName

      public static Class<?> getClassByName(String className)
      Gets a class object based on the given class name.
      Parameters:
      className - The class to get its object. Note: The parameter must contain the package and the class name like java.lang.String.
      Returns:
      the requested class. Otherwise, if the class is not defined, the method returns null.
    • getStringFieldByName

      public static String getStringFieldByName(Class<?> c, String fieldName)
      Provides a String value of a given class field name.
      Parameters:
      c - The class to search in.
      fieldName - The field to retrieve the value.
      Returns:
      the field value if the field exists and is accessible. Otherwise, it returns null.