code: public static PropertyEditor getInstance(Class<?> type) {
          if (type == null) {
              throw new NullPointerException("type");
          }
          
          if (type.isEnum()) {
              return new EnumEditor(type);
          }
          
          if (type.isArray()) {
              return new ArrayEditor(type.getComponentType());
          }
          
          if (Collection.class.isAssignableFrom(type)) {
              if (Set.class.isAssignableFrom(type)) {
                  return new SetEditor(String.class);
              }
              
              if (List.class.isAssignableFrom(type)) {
                  return new ListEditor(String.class);
              }
              
              return new CollectionEditor(String.class);
          }
          
          if (Map.class.isAssignableFrom(type)) {
              return new MapEditor(String.class, String.class);
          }
          
          if (Properties.class.isAssignableFrom(type)) {
              return new PropertiesEditor();
          }
          
          type = filterPrimitiveType(type);
  
          try {
              return (PropertyEditor)
                      PropertyEditorFactory.class.getClassLoader().loadClass(
                              PropertyEditorFactory.class.getPackage().getName() +
                              '.' + type.getSimpleName() + "Editor").newInstance();
          } catch (Exception e) {
              return null;
          }
      }
docs: parent type / property name / property type