Example usage for org.springframework.beans.propertyeditors CustomMapEditor CustomMapEditor

List of usage examples for org.springframework.beans.propertyeditors CustomMapEditor CustomMapEditor

Introduction

In this page you can find the example usage for org.springframework.beans.propertyeditors CustomMapEditor CustomMapEditor.

Prototype

@SuppressWarnings("rawtypes")
public CustomMapEditor(Class<? extends Map> mapType) 

Source Link

Document

Create a new CustomMapEditor for the given target type, keeping an incoming null as-is.

Usage

From source file:org.eclipse.gemini.blueprint.context.support.OsgiPropertyEditorRegistrar.java

public void registerCustomEditors(PropertyEditorRegistry registry) {
    for (Map.Entry<Class<?>, Class<? extends PropertyEditor>> entry : editors.entrySet()) {
        Class<?> type = entry.getKey();
        PropertyEditor editorInstance;
        editorInstance = BeanUtils.instantiate(entry.getValue());
        registry.registerCustomEditor(type, editorInstance);
    }//from   w  w  w.  ja  va 2 s.c om

    // register non-externalized types
    registry.registerCustomEditor(Dictionary.class, new CustomMapEditor(Hashtable.class));
    registry.registerCustomEditor(Properties.class, new PropertiesEditor());
    registry.registerCustomEditor(Class.class, new ClassEditor(userClassLoader));
    registry.registerCustomEditor(Class[].class, new ClassArrayEditor(userClassLoader));
}