private static boolean matchesEnumField(Data data, DataType dt, FieldMatcher matcher) {
		if (!(dt instanceof Enum)) {
			return false;
		}

		Enum enumm = (Enum) dt;
		List<String> names = getEnumNames(data, enumm);
		for (String name : names) {
			if (!enumm.contains(name)) {
				continue;
			}
			long value = enumm.getValue(name);
			if (matcher.matches(name, (int) value)) {
				return true;
			}
		}
		return false;
	}
Searches defined data for types that match, according to the given predicate.

@param accumulator the results accumulator
@param program the program
@param dataMatcher the predicate that determines a successful match
@param fieldMatcher the field matcher; will be ignored if it contains null values
@param monitor the task monitor used to track progress and cancel the work
@throws CancelledException if the operation was cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/ReferenceUtils.java