docs: @SuppressWarnings("rawtypes")
      public Method getAnnotatedMethod(Class clazz, Class<? extends Annotation> annotationClass) {
          Method m = null;
  
          Method[] methods = clazz.getDeclaredMethods();
  
          for (int i = 0; i < methods.length; i++) {
              Annotation[] a = methods[i].getAnnotations();
              if (a != null) {
                  for (int j = 0; j < a.length; j++) {
                      if (a[j].annotationType() == annotationClass) {
                          if (m == null) {
                              m = methods[i];
                          } else {
                              Tr.warning(tc, "DUPLICATE_CALLBACK_METHOD_CWWKC2454W", new Object[] { methods[i].getName(), clazz.getName() });
                          }
                      }
                  }
              }
          }
          return m;
      }