Class ResourceEditorRegistrar
- java.lang.Object
- org.springframework.beans.support.ResourceEditorRegistrar
- All Implemented Interfaces:
PropertyEditorRegistrar
public class ResourceEditorRegistrar extends Object implements PropertyEditorRegistrar
PropertyEditorRegistrar implementation that populates a givenPropertyEditorRegistry(typically aBeanWrapperused for bean creation within anApplicationContext) with resource editors. Used byAbstractApplicationContext.- Since:
- 2.0
- Author:
- Juergen Hoeller, Chris Beams
Constructor Summary
Constructors Constructor Description ResourceEditorRegistrar(ResourceLoader resourceLoader, PropertyResolver propertyResolver)Create a new ResourceEditorRegistrar for the givenResourceLoaderandPropertyResolver.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidregisterCustomEditors(PropertyEditorRegistry registry)Populate the givenregistrywith the following resource editors: ResourceEditor, InputStreamEditor, InputSourceEditor, FileEditor, URLEditor, URIEditor, ClassEditor, ClassArrayEditor.
Constructor Detail
ResourceEditorRegistrar
public ResourceEditorRegistrar(ResourceLoader resourceLoader, PropertyResolver propertyResolver)
Create a new ResourceEditorRegistrar for the givenResourceLoaderandPropertyResolver.- Parameters:
resourceLoader- the ResourceLoader (or ResourcePatternResolver) to create editors for (usually an ApplicationContext)propertyResolver- the PropertyResolver (usually an Environment)- See Also:
Environment,ResourcePatternResolver,ApplicationContext
Method Detail
registerCustomEditors
public void registerCustomEditors(PropertyEditorRegistry registry)
Populate the givenregistrywith the following resource editors: ResourceEditor, InputStreamEditor, InputSourceEditor, FileEditor, URLEditor, URIEditor, ClassEditor, ClassArrayEditor.If this registrar has been configured with a
ResourcePatternResolver, a ResourceArrayPropertyEditor will be registered as well.- Specified by:
registerCustomEditorsin interfacePropertyEditorRegistrar- Parameters:
registry- thePropertyEditorRegistryto register the customPropertyEditorswith- See Also:
ResourceEditor,InputStreamEditor,InputSourceEditor,FileEditor,URLEditor,URIEditor,ClassEditor,ClassArrayEditor,ResourceArrayPropertyEditor