public boolean parseAndSetValueByType(String str, AddressFactory addressFactory) {
		if (getValueClass() == null) {
			return false;
		}
		if (Boolean.class.isAssignableFrom(getValueClass())) {
			try {
				setValue(BooleanUtils.toBoolean(str, "true", "false"));
			}
			catch (IllegalArgumentException e) {
				return false;
			}
		}
		else if (HexLong.class.isAssignableFrom(getValueClass())) {
			try {
				setValue(new HexLong(NumericUtilities.parseHexLong(str)));
			}
			catch (NumberFormatException e) {
				return false;
			}
		}
		else if (Integer.class.isAssignableFrom(getValueClass())) {
			try {
				setValue(Integer.decode(str));
			}
			catch (NumberFormatException e) {
				return false;
			}
		}
		else if (Address.class.isAssignableFrom(getValueClass())) {
			try {
				Address origAddr = (Address) getValue();
				Address newAddr = null;
				if (origAddr != null) {
					newAddr = origAddr.getAddress(str);
				}
				else {
					if (addressFactory == null) {
						throw new RuntimeException("Attempted to use Address type option (" +
							getName() + ") without specifying Address Factory");
					}
					newAddr = addressFactory.getDefaultAddressSpace().getAddress(str);
				}
				if (newAddr == null) {
					return false;
				}
				setValue(newAddr);
			}
			catch (AddressFormatException e) {
				return false;
			}
		}
		else if (String.class.isAssignableFrom(getValueClass())) {
			setValue(str);
		}
		else {
			return false;
		}
		return true;
	}
Set the value for this option by parsing the given string and converting it to the option's
type.  Fails if this option doesn't have a type associated with it, or if an unsupported
type is needed to be parsed.

@param str The value to set, in string form.
@param addressFactory An address factory to use for when the option trying to be set is an Address.
If null, an exception will be thrown for Address type options.
@return True if the value was successfully parsed and set; otherwise, false.
Ghidra/Features/Base/src/main/java/ghidra/app/util/Option.java