private Object invokeValueOf ( Class < ? > clazz , String value ) throws IllegalAccessException , InvocationTargetException { try { return MethodUtils . invokeExactStaticMethod ( clazz , "valueOf" , value ) ; } catch ( NoSuchMethodException e ) { return null ; } }
Tries to invoke the method valueOf of the given class object . If this method can be called the result will be given back based on the given value which is used as parameter for the method . If this method can t be called null will be given back .