private static void collectAnnotatedMethods(Class<? extends Annotation> annotCls, Class<?> cls,
			Set<Method> defs,
			Set<Class<?>> visited) {
		if (!visited.add(cls)) {
			return;
		}
		Class<?> superCls = cls.getSuperclass();
		if (superCls != null) {
			collectAnnotatedMethods(annotCls, superCls, defs, visited);
		}
		for (Class<?> superIf : cls.getInterfaces()) {
			collectAnnotatedMethods(annotCls, superIf, defs, visited);
		}
		collectAnnotatedMethodsForClass(annotCls, cls, defs);
	}
Collect from among the given class, its superclasses, and its interfaces all methods
annotated with the given annotation type.

@param annotCls the annotation type
@param cls the class whose methods to examine
@return the set of all methods having the given annotation type
Ghidra/Framework/Emulation/src/main/java/utilities/util/AnnotationUtilities.java