|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyEditorRegistry
Interface that encapsulates methods for registering JavaBeans PropertyEditors. This is the interface that a PropertyEditorRegistrar operates on.
Implemented by BeanWrapper/BeanWrapperImpl and by the DataBinder class in the validation package.
PropertyEditorRegistrar
,
BeanWrapper
,
BeanWrapperImpl
,
DataBinder
Method Summary | |
---|---|
PropertyEditor |
findCustomEditor(Class requiredType,
String propertyPath)
Find a custom property editor for the given type and property. |
void |
registerCustomEditor(Class requiredType,
PropertyEditor propertyEditor)
Register the given custom property editor for all properties of the given type. |
void |
registerCustomEditor(Class requiredType,
String propertyPath,
PropertyEditor propertyEditor)
Register the given custom property editor for the given type and property, or for all properties of the given type. |
Method Detail |
---|
void registerCustomEditor(Class requiredType, PropertyEditor propertyEditor)
requiredType
- type of the propertypropertyEditor
- editor to registervoid registerCustomEditor(Class requiredType, String propertyPath, PropertyEditor propertyEditor)
If the property path denotes an array or Collection property, the editor will get applied either to the array/Collection itself (the PropertyEditor has to create an array or Collection value) or to each element (the PropertyEditor has to create the element type), depending on the specified required type.
Note: Only one single registered custom editor per property path is supported. In case of a Collection/array, do not register an editor for both the Collection/array and each element on the same property.
requiredType
- type of the property (can be null
if a property
is given but should be specified in any case for consistency checking)propertyPath
- path of the property (name or nested path), or
null if registering an editor for all properties of the given typepropertyEditor
- editor to registerPropertyEditor findCustomEditor(Class requiredType, String propertyPath)
requiredType
- type of the property (can be null
if a property
is given but should be specified in any case for consistency checking)propertyPath
- path of the property (name or nested path), or
null if looking for an editor for all properties of the given type
null
if none
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |