站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

ClassEditor (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.beans.propertyeditors
Class ClassEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.springframework.beans.propertyeditors.ClassEditor
All Implemented Interfaces:
PropertyEditor

public class ClassEditor
extends PropertyEditorSupport

Property editor for 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.

Since:
13.05.2003
Author:
Juergen Hoeller, Rick Evans
See Also:
Class.forName(java.lang.String), ClassUtils.forName(String, ClassLoader)

Constructor Summary
ClassEditor()
          Create a default ClassEditor, using the thread context ClassLoader.
ClassEditor(ClassLoader classLoader)
          Create a default ClassEditor, using the given ClassLoader.
 
Method Summary
 String getAsText()
           
 void setAsText(String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Parameters:
classLoader - the ClassLoader to use (or null for the thread context ClassLoader)
Method Detail

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Throws:
IllegalArgumentException

getAsText

public String getAsText()
Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport

The Spring Framework

Copyright © 2002-2007 The Spring Framework.