类 ClassEditor
- java.lang.Object
- java.beans.PropertyEditorSupport
- org.springframework.beans.propertyeditors.ClassEditor
- 所有已实现的接口:
PropertyEditor
public class ClassEditor extends PropertyEditorSupport
Property editor forjava.lang.Class
, to enable the direct population of aClass
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.- 从以下版本开始:
- 13.05.2003
- 作者:
- Juergen Hoeller, Rick Evans
- 另请参阅:
Class.forName(java.lang.String)
,ClassUtils.forName(String, ClassLoader)
构造器概要
构造器 构造器 说明 ClassEditor()
Create a default ClassEditor, using the thread context ClassLoader.ClassEditor(ClassLoader classLoader)
Create a default ClassEditor, using the given ClassLoader.
构造器详细资料
ClassEditor
public ClassEditor()
Create a default ClassEditor, using the thread context ClassLoader.
ClassEditor
public ClassEditor(ClassLoader classLoader)
Create a default ClassEditor, using the given ClassLoader.- 参数:
classLoader
- the ClassLoader to use (ornull
for the thread context ClassLoader)
方法详细资料
setAsText
public void setAsText(String text) throws IllegalArgumentException
- 指定者:
setAsText
在接口中PropertyEditor
- 覆盖:
setAsText
在类中PropertyEditorSupport
- 抛出:
IllegalArgumentException
getAsText
public String getAsText()
- 指定者:
getAsText
在接口中PropertyEditor
- 覆盖:
getAsText
在类中PropertyEditorSupport