private static DataType getArrayDataType(Field field, Object object, Class<?> clazz) {
		Class<?> arrayClazz = clazz.getComponentType();

		if (arrayClazz.equals(byte.class)) {
			try {
				field.setAccessible(true);
				byte [] array = (byte [])field.get(object);
				int nElements = array.length;
				DataType arrayDataType = new ByteDataType();
				return new ArrayDataType(arrayDataType, nElements, arrayDataType.getLength());
			}
			catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		else if (arrayClazz.equals(int.class)) {
			try {
				field.setAccessible(true);
				int [] array = (int [])field.get(object);
				int nElements = array.length;
				DataType arrayDataType = new DWordDataType();
				return new ArrayDataType(arrayDataType, nElements, arrayDataType.getLength());
			}
			catch (Exception e) {
				throw new RuntimeException(e);
			}
		}

		throw new RuntimeException("Unsupported array datatype for automatic structure conversion - "+clazz);
	}
This is a convenience method for converting a class into structure.
The class is reflected to extract the field members.
Only private non-static fields are considered.
Any field names that start with underscore ("_") are ignored.
@param clazz the class to reflect
@return a structure representing the class fields.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/StructConverterUtil.java