public GnuDemanglerOptions withDemanglerFormat(GnuDemanglerFormat demanglerFormat,
			boolean useDeprecated) throws IllegalArgumentException {
		if (this.format == demanglerFormat && this.isDeprecated == useDeprecated) {
			return this;
		}
		if (demanglerFormat.isAvailable(useDeprecated)) {
			return new GnuDemanglerOptions(this, demanglerFormat, useDeprecated);
		}
		throw new IllegalArgumentException(
			demanglerFormat.name() + " is not available in the " + getDemanglerName());
	}
A convenience method to copy the state of this options object, changing the
demangler executable name and demangler format to the specified values

@param demanglerFormat the demangling format to use
@param useDeprecated true to use the deprecated gnu demangler, else false
@return the new options
@throws IllegalArgumentException if the current format is not available in the
selected demangler.
Ghidra/Features/GnuDemangler/src/main/java/ghidra/app/util/demangler/gnu/GnuDemanglerOptions.java