Class ClassUtils
java.lang.Object
eu.europa.ec.taxud.validation.utils.ClassUtils
Provides useful stuff to handle object through reflection.
- Version:
- $Revision$
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> getClassByName(String className) Gets a class object based on the given class name.static StringgetStringFieldByName(Class<?> c, String fieldName) Provides a String value of a given class field name.
-
Method Details
-
getClassByName
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 likejava.lang.String.- Returns:
- the requested class. Otherwise, if the class is not defined, the method returns
null.
-
getStringFieldByName
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.
-