private FieldReadFunction<T> getReadPrimitiveValueFunc(Class<?> destClass) {
		// Create a lambda that reads a primitive value from a context that is specific to the
		// java field's type (destClass)
		// TODO: floats, other primitive types(?)

		if (destClass == Long.class || destClass == Long.TYPE) {
			return (context) -> context.fieldInfo().isUnsigned()
					? context.reader().readNextUnsignedValue(context.fieldInfo().getLength())
					: context.reader().readNextValue(context.fieldInfo().getLength());
		}
		if (destClass == Integer.class || destClass == Integer.TYPE) {
			return (context) -> context.fieldInfo().isUnsigned()
					? (int) context.reader().readNextUnsignedValue(context.fieldInfo().getLength())
					: (int) context.reader().readNextValue(context.fieldInfo().getLength());
		}
		if (destClass == Short.class || destClass == Short.TYPE) {
			return (context) -> context.fieldInfo().isUnsigned()
					? (short) context.reader()
							.readNextUnsignedValue(context.fieldInfo().getLength())
					: (short) context.reader().readNextValue(context.fieldInfo().getLength());
		}
		if (destClass == Byte.class || destClass == Byte.TYPE) {
			return (context) -> context.fieldInfo().isUnsigned()
					? (byte) context.reader().readNextUnsignedValue(context.fieldInfo().getLength())
					: (byte) context.reader().readNextValue(context.fieldInfo().getLength());
		}
		if (destClass == Character.class || destClass == Character.TYPE) {
			return (context) -> context.fieldInfo().isUnsigned()
					? (char) context.reader().readNextUnsignedValue(context.fieldInfo().getLength())
					: (char) context.reader().readNextValue(context.fieldInfo().getLength());
		}
		return null;
	}
Creates a FieldMappingInfo instance, used when the structure is variable length and there is
no pre-defined Ghidra Structure data type.

@param <T> structure mapped class type
@param field java field
@param fieldName name of Ghidra structure field
@param signedness {@link Signedness} enum
@param length override of structure field, or -1
@return new {@link FieldMappingInfo} instance
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/structmapping/FieldMappingInfo.java