Bug 127861 [DataBinding] Mark API provisional
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/validator/ValidatorRegistry.java
*/
    public void associate(Class fromClass, Class toClass, IValidator validator) {
        validators.put(new Pair(fromClass, toClass), validator);
    }
    
    /**
     * Return an IVerifier for a specific class.
     * 
     * @param fromClass The Class to convert from
     * @param toClass The Class to convert to
     * @return An appropriate IValidator
     */
    public IValidator get(Class fromClass, Class toClass) {
        IValidator result = (IValidator) validators.get(new Pair(fromClass, toClass));
        if (result == null) {
            return ReadOnlyValidator.getDefault();
        }
        return result;
    }
    
    /**
     * Adds the system-provided validators to the current validator registry.  This is done
     * automatically for the validator registry singleton.
     */
    public void addSystemValidators() {
        
        associate(String.class, Integer.TYPE, new String2IntValidator());
        associate(String.class, Byte.TYPE, new String2ByteValidator());
        associate(String.class, Short.TYPE, new String2ShortValidator());
        associate(String.class, Long.TYPE, new String2LongValidator());