@Override
	public void accumulateMatches(DataType dt, FieldMatcher fieldMatcher,
			List<DataTypeReference> results) {

		if (fields.isEmpty()) {
			DecompilerVariable var = getMatch(dt, fieldMatcher, variable, null);
			if (var != null) {
				DataTypeReference ref = createReference(var);
				results.add(ref);
			}
			return;
		}

		//
		// Walk each pair of type and variables in order to see if any of them match our
		// criteria
		//
		DecompilerVariable start = variable;
		for (DecompilerVariable field : fields) {

			DecompilerVariable next = field;
			DecompilerVariable var = getMatch(dt, fieldMatcher, start, next);
			if (var != null) {
				DataTypeReference ref = createReference(var, next);
				results.add(ref);
			}

			start = next;
		}

		//
		// Handle the last variable by itself (for the case where we are matching just on the type,
		// with no field name)
		//
		if (fieldMatcher.isIgnored()) {
			return;
		}

		DecompilerVariable var = getMatch(dt, fieldMatcher, start, null);
		if (var != null) {
			DataTypeReference ref = createReference(var);
			results.add(ref);
		}
	}
A class that describes Decompiler variables and the fields that they may access.
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/extension/datatype/finder/VariableAccessDR.java