private void nestedStructureOutputFunc(StructureContext<T> context, Structure structure,
			FieldOutputInfo<T> foi) throws IOException {
		Object nestedStruct = foi.getValue(context.getStructureInstance(), Object.class);
		if (nestedStruct == null) {
			return;
		}

		StructureContext<?> nestedStructContext =
			context.getDataTypeMapper().getStructureContextOfInstance(nestedStruct);
		if (nestedStructContext == null) {
			throw new IOException(
				"Missing StructureContext for " + nestedStruct.getClass().getSimpleName());
		}
		DataType nestedStructDT = nestedStructContext.getStructureDataType();
		preAddField(structure);
		structure.add(nestedStructDT, fmi.getFieldName(), null);
	}
Returns the value of this java field.

@param <R> type of the result value
@param structInstance object containing the field
@param expectedType expected class of the value 
@return value of the field, or null if the field's value is not of expected type
@throws IOException if error accessing java field
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/structmapping/FieldOutputInfo.java