code: public static Object convertValue(String text, String typeName) throws ClassNotFoundException, IntrospectionException {
          // see if it is a primitive type first
          Class<?> typeClass = getPrimitiveTypeForName(typeName);
          if (typeClass == null) {
              ClassLoader loader = Thread.currentThread().getContextClassLoader();
              typeClass = loader.loadClass(typeName);
          }
          PropertyEditor editor = PropertyEditorFinder.getInstance().find(typeClass);
          if (editor == null) {
              throw new IntrospectionException("No property editor for type=" + typeClass);
          }
  
          editor.setAsText(text);
          return editor.getValue();
      }
docs: Convert a string value into the true value for typeName using the PropertyEditor associated with typeName.
  
  @param text the string represention of the value. This is passed to the PropertyEditor.setAsText method.
  @param typeName the fully qualified class name of the true value type
  @return the PropertyEditor.getValue() result
  @exception ClassNotFoundException thrown if the typeName class cannot be found
  @exception IntrospectionException thrown if a PropertyEditor for typeName cannot be found