Bug 127861 [DataBinding] Mark API provisional
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/validator/ValidatorRegistry.java
* ValidatorRegistry.  A registry for validators.  A singleton is provided that includes all
 * of the system-provided validators by default, but clients are free to use as many instances
 * of this class as they like.  Client-created instances do not contain the system-provided
 * validators by default, but these can be added by calling addSystemValidators().
 */
public class ValidatorRegistry {
	
	private static ValidatorRegistry registry = null;
	
	/**
	 * Return the default validator registry.
	 * 
	 * @return the default validator registry.
	 */
	public static ValidatorRegistry getDefault() {
		if (registry == null) {
			registry = new ValidatorRegistry();
			registry.addSystemValidators();
		}
		return registry;
	}
	
	private HashMap validators = new HashMap();
    
    /**
     * Associate a particular validator that can validate the conversion (fromClass, toClass)
     * 
     * @param fromClass The Class to convert from
     * @param toClass The Class to convert to
     * @param validator The IValidator