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

Editor for java.lang.Class, to directly populate a Class property instead of using a String class name property as bridge.

Also supports "java.lang.String[]"-style array class names, in contrast to the standard Class.forName method. Delegates to ClassUtils for actual class name resolution.

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

Constructor Summary
ClassEditor()
           
 
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()
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


Copyright (c) 2002-2005 The Spring Framework Project.