public final class PropertyEditorResolver
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PropertyEditorResolver.NoopPropertyEditor |
| Modifier and Type | Field and Description |
|---|---|
static java.beans.PropertyEditor |
NOOP_PROPERTY_EDITOR |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear()
Removes all currently registered value editors.
|
static java.beans.PropertyEditor |
findEditor(java.lang.Class<?> type)
Locate a value editor for a given target type.
|
static void |
registerEditor(java.lang.Class<?> targetType,
java.lang.Class<? extends java.beans.PropertyEditor> editorClass)
Registers an editor class to edit values of the given target class.
|
static void |
unregisterEditor(java.lang.Class<?> targetType)
Unregisters an editor class to edit values of the given target class.
|
public static final java.beans.PropertyEditor NOOP_PROPERTY_EDITOR
public static void clear()
@Nonnull
public static java.beans.PropertyEditor findEditor(@Nonnull
java.lang.Class<?> type)
If the input type is an Enum then an instance of EnumPropertyEditor
is returned with the type set as enumType.
type - The Class object for the type to be editedEnumPropertyEditorpublic static void unregisterEditor(@Nonnull
java.lang.Class<?> targetType)
targetType - the class object of the type to be editedpublic static void registerEditor(@Nonnull
java.lang.Class<?> targetType,
@Nullable
java.lang.Class<? extends java.beans.PropertyEditor> editorClass)
null,
then any existing definition will be removed.
Thus this method can be used to cancel the registration.
The registration is canceled automatically
if either the target or editor class is unloaded.
targetType - the class object of the type to be editededitorClass - the class object of the editor class