Package org.springframework.beans

# Interface PropertyEditorRegistrar

All Known Implementing Classes:
  `ResourceEditorRegistrar`

public interface PropertyEditorRegistrar
Interface for strategies that register custom `property editors` with a `property editor registry`.

This is particularly useful when you need to use the same set of property editors in several situations: write a corresponding registrar and reuse that in each case.

Since:
  1.2.6
Author:
  Juergen Hoeller
See Also:
  - `PropertyEditorRegistry`
  - `PropertyEditor`

## Method Summary

Modifier and Type
Method
Description
`default boolean`
`overridesDefaultEditors()`
Indicate whether this registrar exclusively overrides default editors rather than registering custom editors, intended to be applied lazily.
`void`
`registerCustomEditors(PropertyEditorRegistry registry)`
Register custom `PropertyEditors` with the given `PropertyEditorRegistry`.

## Method Details

### registerCustomEditors

void registerCustomEditors(PropertyEditorRegistry registry)
Register custom `PropertyEditors` with the given `PropertyEditorRegistry`.

The passed-in registry will usually be a `BeanWrapper` or a `DataBinder`.

It is expected that implementations will create brand new `PropertyEditors` instances for each invocation of this method (since `PropertyEditors` are not threadsafe).

Parameters:
  `registry` - the `PropertyEditorRegistry` to register the custom `PropertyEditors` with

### overridesDefaultEditors

default boolean overridesDefaultEditors()
Indicate whether this registrar exclusively overrides default editors rather than registering custom editors, intended to be applied lazily.

This has an impact on registrar handling in a bean factory: see `ConfigurableBeanFactory.addPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)`.

Since:
  6.2.3
See Also:
  - `PropertyEditorRegistry.registerCustomEditor(java.lang.Class<?>, java.beans.PropertyEditor)`
  - `PropertyEditorRegistrySupport.overrideDefaultEditor(java.lang.Class<?>, java.beans.PropertyEditor)`
  - `PropertyEditorRegistrySupport.setDefaultEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar)`