private String[] buildFieldOptions(ArrayList<String> allFields) {
		int size = accessVn.getSize();
		int startOff = 0;
		boolean exactMatch = true;
		if (parentDt instanceof Pointer) {
			size = 0;
		}
		if (parentDt instanceof PartialUnion) {
			startOff = ((PartialUnion) parentDt).getOffset();
			exactMatch = false;
		}
		int endOff = startOff + size;
		DataTypeComponent[] components = unionDt.getDefinedComponents();
		ArrayList<String> res = new ArrayList<>();
		allFields.add("(no field)");
		if (size == 0 || !exactMatch || size == parentDt.getLength()) {
			res.add("(no field)");
		}
		for (DataTypeComponent component : components) {
			String nm = component.getFieldName();
			if (nm == null || nm.length() == 0) {
				nm = component.getDefaultFieldName();
			}
			allFields.add(nm);
			int compStart = component.getOffset();
			int compEnd = compStart + component.getLength();

			if (size == 0 || (exactMatch && startOff == compStart && endOff == compEnd) ||
				(!exactMatch && startOff >= compStart && endOff <= compEnd)) {
				res.add(nm);
			}
		}
		String[] resArray = new String[res.size()];
		res.toArray(resArray);
		return resArray;
	}
Build a list of all the union field names for the user to select from, when determining
which data-type to force.  Two lists are produced.  The first contains every possible
field name. The second list is filtered by the size and offset of the Varnode being forced.
@param allFields will hold the unfiltered list of names
@return the filtered list of names
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/actions/ForceUnionAction.java