public static Field locateFieldByTypeOnClass(Class<?> classType, Class<?> containingClass) {
		Field[] declaredFields = containingClass.getDeclaredFields();
		for (Field field : declaredFields) {
			Class<?> fieldClass = field.getType();
			if (fieldClass == classType) {
				return field;
			}
		}

		// try our parent
		Class<?> parentClass = containingClass.getSuperclass();
		if (parentClass == null) {
			return null;
		}
		return locateFieldByTypeOnClass(classType, parentClass);
	}
Get the first field specification contained within containingClass which has the type classType.
This method is only really useful if it is known that only a single field of
classType exists within the containingClass hierarchy.
@param classType the class
@param containingClass the class that contains a field of the given type
@return field which corresponds to type classType or null
Ghidra/Framework/Utility/src/main/java/utilities/util/reflection/ReflectionUtilities.java