private void readWrappedOptions(Element root) throws ReflectiveOperationException {

		Iterator<?> it = root.getChildren(WRAPPED_OPTION_NAME).iterator();
		while (it.hasNext()) {

			Element element = (Element) it.next();
			List<?> children = element.getChildren();
			if (children.isEmpty()) {
				continue; // shouldn't happen
			}

			String optionName = element.getAttributeValue(NAME_ATTRIBUTE);
			Class<?> c = Class.forName(element.getAttributeValue(CLASS_ATTRIBUTE));
			Constructor<?> constructor = c.getDeclaredConstructor();
			WrappedOption wo = (WrappedOption) constructor.newInstance();
			wo.readState(new SaveState(element));

			if (wo instanceof WrappedCustomOption wrappedCustom && !wrappedCustom.isValid()) {
				continue;
			}
			if (wo instanceof WrappedKeyStroke wrappedKs) {
				wo = wrappedKs.toWrappedActionTrigger();
			}

			Option option = createUnregisteredOption(optionName, wo.getOptionType(), null);
			valueMap.put(optionName, option);

			Element child = (Element) children.get(0);
			String elementName = child.getName();
			if (CLEARED_VALUE_ELEMENT_NAME.equals(elementName)) {
				// a signal that the default option value has been cleared
				option.doSetCurrentValue(null); // use doSet so that it is not registered
			}
			else {
				option.doSetCurrentValue(wo.getObject()); // use doSet so that it is not registered
			}
		}
	}
Construct a new Options object from the given XML element.
@param root XML that contains the set of options to restore
Ghidra/Framework/Gui/src/main/java/ghidra/framework/options/ToolOptions.java