private void validateByType(ModuleOption option, String value) {
		if (value == null || option.getType() == null) {
			return;
		}
		// Boolean conversion accepts any string, so need to check explicit values
		if (boolean.class.getName().equals(option.getType())
				|| Boolean.class.getName().equals(option.getType())) {
			if (!(value.equalsIgnoreCase("true") || value.equalsIgnoreCase("false") || value.equals("1") || value.equals("0"))) {
				throw new RuntimeException(String.format(
						"The value '%s' is the wrong type for option '%s'. The required type is %s.",
						value, option.getName(), option.getType()));
			}
		}
		else {
			try {
				if (int.class.getName().equals(option.getType()) || Integer.class.getName().equals(option.getType())) {
					Integer.parseInt(value);
				}
				else if (float.class.getName().equals(option.getType())
						|| Float.class.getName().equals(option.getType())) {
					Float.parseFloat(value);
				}
				else if (double.class.getName().equals(option.getType())
						|| Double.class.getName().equals(option.getType())) {
					Double.parseDouble(value);
				}
				else if (short.class.getName().equals(option.getType())
						|| Short.class.getName().equals(option.getType())) {
					Short.parseShort(value);
				}
			}
			catch (NumberFormatException e) {
				//TODO: SpringXDException not available to this library
				throw new RuntimeException(String.format(
						"The value '%s' is the wrong type for option '%s'. The required type is %s.",
						value, option.getName(), option.getType()));
			}
		}
	}
@param option option metadata
@param value the value as String
spring-xd-module/src/main/java/org/springframework/xd/module/options/SimpleModuleOptionsMetadata.java