package org.springframework.beans.propertyeditors;

import java.beans.PropertyEditorSupport;

/**
 * Editor for java.lang.Class, to directly feed a Class property
 * instead of needing an additional class name property.
 * @author Juergen Hoeller
 * @since 13.05.2003
 */
public class ClassEditor extends PropertyEditorSupport {

	public void setAsText(String text) throws IllegalArgumentException {
		Class clazz = null;
		try {
			clazz = Class.forName(text);
		}
		catch (ClassNotFoundException ex) {
			throw new IllegalArgumentException("Invalid class name [" + text + "]: " + ex.getMessage());
		}
		setValue(clazz);
	}

	public String getAsText() {
		return ((Class) getValue()).getName();
	}

}

@@ -452,16 +452,70 @@
 ame(text
+, true, Thread.currentThread().getContextClassLoader()
 );%0A%09%09%7D%0A%09

use thread context class loader