code: static <T> Pair<Boolean, T> constructViaConstructor(Class<T> type, String fromValue) {
  
  		Constructor[] allConstructors = type.getDeclaredConstructors();
  		for (Constructor ctor : allConstructors) {
  
  			Class<?>[] pType = ctor.getParameterTypes();
  			if (pType.length == 1) { // ok ... match ... might be possible to use
  
  				try {
  
  					for (Class primitive : SIMPLE_TYPE) {
  
  						if (pType[0].isAssignableFrom(primitive)) {
  
  							Object value = stringToPrimitiveType(fromValue, primitive);
  							return new Pair(true, ctor.newInstance(value));
  						}
  					}
  				}
  				catch (IllegalAccessException | InstantiationException | InvocationTargetException e) {
  					//continue; // try next one ... if any
  					log.warn("Failed constructing: " + ctor, e);
  				}
  			}
  		}
  
  		return new Pair<>(false, null);
  	}
docs: have a constructor that accepts a single argument
  (String or any other primitive type that can be converted from String)
  Pair(success, object)