public class ClassEditor
extends java.beans.PropertyEditorSupport
java.lang.Class
, to enable the direct
population of a Class
property without recourse to having to use a
String class name property as bridge.
Also supports "java.lang.String[]"-style array class names, in contrast to the
standard Class.forName(String)
method.
Class.forName(java.lang.String)
,
ClassUtils.forName(String, ClassLoader)
Constructor and Description |
---|
ClassEditor()
Create a default ClassEditor, using the thread context ClassLoader.
|
ClassEditor(java.lang.ClassLoader classLoader)
Create a default ClassEditor, using the given ClassLoader.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsText() |
void |
setAsText(java.lang.String text) |
public ClassEditor()
public ClassEditor(java.lang.ClassLoader classLoader)
classLoader
- the ClassLoader to use
(or null
for the thread context ClassLoader)public void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
setAsText
in interface java.beans.PropertyEditor
setAsText
in class java.beans.PropertyEditorSupport
java.lang.IllegalArgumentException
public java.lang.String getAsText()
getAsText
in interface java.beans.PropertyEditor
getAsText
in class java.beans.PropertyEditorSupport