private void dataTypeNameOutputFunc(StructureContext<T> context, Structure structure,
			FieldOutputInfo<T> foi) throws IOException {
		DataType dt = context.getDataTypeMapper().getType(dataTypeName, DataType.class);
		if (dt == null) {
			throw new IOException(
				"Missing data type %s for field %s".formatted(dataTypeName, fmi.getFieldName()));
		}
		preAddField(structure);
		if (dt instanceof Dynamic) {
			throw new IOException("Invalid dynamic sized data type %s for field %s"
					.formatted(dt.getName(), fmi.getFieldName()));
		}
		structure.add(dt, 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