private Equate getOrCreateEquate(String name, long value) {
		Equate equate = equateTable.getEquate(name);
		if (equate != null) {
			return equate;
		}

		try {
			equate = equateTable.createEquate(name, value);
		}
		catch (DuplicateNameException | InvalidInputException e) {
			// These should not happen:
			// Duplicate will not happen since we checked for the existence first; Invalid 
			// can't happen since we built the name ourselves (we are assuming)
			Msg.error(this, "Unexpected error creating equate", e);  // just in case
		}
		return equate;
	}
Constructor

@param program The program to use
@param addresses The addresses to apply an enum to
@param enoom The enum to apply equates with
@param shouldDoOnSubOps true if the enum should also be applied to the sub-operands.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/equate/CreateEnumEquateCommand.java