Class ClassArrayEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.beans.propertyeditors.ClassArrayEditor
- All Implemented Interfaces:
PropertyEditor
Property editor for an array of
Classes
, to enable
the direct population of a Class[]
property without 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:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
-
Constructor Summary
ConstructorDescriptionCreate a defaultClassEditor
, using the thread contextClassLoader
.ClassArrayEditor
(ClassLoader classLoader) Create a defaultClassArrayEditor
, using the givenClassLoader
. -
Method Summary
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
Constructor Details
-
ClassArrayEditor
public ClassArrayEditor()Create a defaultClassEditor
, using the thread contextClassLoader
. -
ClassArrayEditor
Create a defaultClassArrayEditor
, using the givenClassLoader
.- Parameters:
classLoader
- theClassLoader
to use (or passnull
for the thread contextClassLoader
)
-
-
Method Details
-
setAsText
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
- Throws:
IllegalArgumentException
-
getAsText
- Specified by:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
-