code: public static Annotation getClassAnnotation(final Class classToCheck, final Class annoClass)
      {
          final Set<Class> visited = new HashSet<>();
          final LinkedList<Class> stack = new LinkedList<>();
          stack.add(classToCheck);
  
          while (!stack.isEmpty())
          {
              Class classToChk = stack.pop();
              if (classToChk == null || visited.contains(classToChk))
              {
                  continue;
              }
              visited.add(classToChk);
              Annotation a = classToChk.getAnnotation(annoClass);
              if (a != null)
              {
                  return a;
              }
              stack.push(classToChk.getSuperclass());
              addInterfaces(classToChk, stack);
          }
          return null;
      }
docs: Determine if the passed in class (classToCheck) has the annotation (annoClass) on itself,
  any of its super classes, any of it's interfaces, or any of it's super interfaces.
  This is a exhaustive check throughout the complete inheritance hierarchy.
  @return the Annotation if found, null otherwise.