code: public synchronized PropertyEditor getEditor(Class<?> type) {
          if (type == null) {
              return null;
          }
          PropertyEditor editor = null;
          Object value = typeToEditor.get(type);
          if (value == null && type.isEnum()) {
              value = typeToEditor.get(Enum.class);
          }
          if (value instanceof PropertyEditor) {
              editor = (PropertyEditor) value;
          } else if (value instanceof Class<?>) {
              try {
                  editor = (PropertyEditor) ((Class<?>) value).newInstance();
              } catch (InstantiationException e) {
                  Logger.getLogger(PropertyEditorRegistry.class.getName()).log(Level.SEVERE, null, e);
              } catch (IllegalAccessException e) {
                  Logger.getLogger(PropertyEditorRegistry.class.getName()).log(Level.SEVERE, null, e);
              }
          }
          return editor;
      }
docs: Gets an editor for the given property type. The lookup is as follow:
  <ul>
  <li>if an editor was registered with
  {@link #registerEditor(Class, PropertyEditor)}, it is returned, else</li>
  <li>if an editor class was registered with
  {@link #registerEditor(Class, Class)}, it is returned, else
  <li>
  <li>it returns null.</li>
  </ul>
  
  @param type
  @return an editor suitable for the Property type or null if none found