Spring Framework PropertyEditorRegistrySupport - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework PropertyEditorRegistrySupport class.

This code example shows how to use the following methods:registerDefaultEditors
 * @since 6.4 
 */ 
public class DefaultPropertyEditorRegistry  
		extends PropertyEditorRegistrySupport {
 
	public DefaultPropertyEditorRegistry() { 
		registerDefaultEditors(); 
	} 
	 
	public PropertyEditor findEditor(Class<?> requiredType) {
		return findEditor(requiredType, null);
	} 
 
	public PropertyEditor findEditor(Class<?> requiredType, String propertyPath) {
		PropertyEditor pe = findCustomEditor(requiredType, propertyPath);
		if (pe == null) {
			pe = getDefaultEditor(requiredType);
		} 
		return pe;
	} 
6
CodeRank
This code example shows how to use the following methods:overrideDefaultEditor
	 * Override default editor, if possible (since that's what we really mean to do here); 
	 * otherwise register as a custom editor. 
	 */ 
	private void doRegisterEditor(PropertyEditorRegistry registry, Class<?> requiredType, PropertyEditor editor) {
		if (registry instanceof PropertyEditorRegistrySupport) {
			((PropertyEditorRegistrySupport) registry).overrideDefaultEditor(requiredType, editor);
		} 
		else { 
			registry.registerCustomEditor(requiredType, editor);
		} 
	} 
 
} 
5
CodeRank
This code example shows how to use the following methods:registerDefaultEditors
@XmlRootElement(name="global") 
@XmlAccessorType(XmlAccessType.FIELD)
public class Global implements Serializable {
	 
	private static class SimplePropertyEditorRegistry extends PropertyEditorRegistrySupport {
		public SimplePropertyEditorRegistry() { 
			registerDefaultEditors(); 
		} 
		 
	} 
 
	@XmlTransient 
	private PropertyEditorRegistrySupport m_editorRegistry = new SimplePropertyEditorRegistry();
 
      //--------------------------/ 
     //- Class/Member Variables -/ 
    //--------------------------/ 
 
    /** 
     * This is the name as it is defined in the rules file 
4
CodeRank
This code example shows how to use the following methods:getDefaultEditor
See Code Examples for Spring Framework PropertyEditorRegistrySupport Methods: