public <T> void registerStructure(Class<T> clazz, DataTypeMapperContext context)
			throws IOException {
		StructureMapping sma = clazz.getAnnotation(StructureMapping.class);
		List<String> structNames = sma != null ? Arrays.asList(sma.structureName()) : List.of();
		Structure structDT = getType(structNames, Structure.class);
		if (structDT == null) {
			String dtName = structNames.isEmpty() ? "<missing>" : String.join("|", structNames);
			if (!StructureReader.class.isAssignableFrom(clazz)) {
				throw new IOException("Missing struct definition for class %s, structure name: [%s]"
						.formatted(clazz.getSimpleName(), dtName));
			}
			if (structNames.size() != 1) {
				throw new IOException(
					"Bad StructMapping,StructureReader definition for class %s, structure name: [%s]"
							.formatted(clazz.getSimpleName(), dtName));
			}
		}

		try {
			StructureMappingInfo<T> structMappingInfo =
				StructureMappingInfo.fromClass(clazz, structDT, context);
			mappingInfo.put(clazz, structMappingInfo);
		}
		catch (IllegalArgumentException e) {
			throw new IOException(e.getMessage());
		}
	}
Registers a class that has {@link StructureMapping structure mapping} information.

@param <T> structure mapped class type
@param clazz class that represents a structure, marked with {@link StructureMapping} 
annotation
@param context {@link DataTypeMapperContext}
@throws IOException if the class's Ghidra structure data type could not be found
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/structmapping/DataTypeMapper.java