private static DataTypeComponent getDataTypeComponent(DataType dt, FieldMatcher matcher) {
		if (dt instanceof Composite) {
			Composite c = (Composite) dt;
			DataTypeComponent[] components = c.getDefinedComponents();
			for (DataTypeComponent component : components) {
				if (matcher.matches(component.getFieldName(), component.getOffset())) {
					return component;
				}
			}
		}
		return null;
	}
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