@SuppressWarnings("unchecked")
	public <T extends Enum<T>> T getEnum(String name, T defaultValue) {
		if (defaultValue != null &&
			(defaultValue.getClass().getModifiers() & Modifier.PUBLIC) == 0) {
			throw new IllegalArgumentException("enum '" + defaultValue.name() + "' must be public");
		}
		try {
			if (map.containsKey(name)) {
				return (T) map.get(name);
			}
		}
		catch (ClassCastException e) {
			// Facilitate transition from StringEnum to Enum
			map.put(name, defaultValue);
		}
		return defaultValue;
	}
Gets the Enum value for the given name.
@param name the name of the pair.
@param defaultValue the default Enum value to be returned if the name does
not exist in the map, or it does not contain the proper object type.
@return the Enum value associated with the given name or the defaultValue
passed in if the name doesn't exist or is the wrong type.
Ghidra/Framework/Generic/src/main/java/ghidra/framework/options/GProperties.java