code: public static Method findMethodWithAnnotation(Method method,
  			Class<? extends Annotation> annotation) {
  		if (method.isAnnotationPresent(annotation)) {
  			return method;
  		}
  
  		Class<?> cl = method.getDeclaringClass();
  		while (cl != null && cl != Object.class) {
  			try {
  				Method equivalentMethod = cl.getDeclaredMethod(method.getName(),
  						method.getParameterTypes());
  				if (equivalentMethod.isAnnotationPresent(annotation)) {
  					return equivalentMethod;
  				}
  			}
  			catch (NoSuchMethodException e) {
  				// do nothing here
  			}
  			cl = cl.getSuperclass();
  		}
  
  		return null;
  	}
docs: Find a method that is annotated with a specific annotation. Starts with the method
  and goes up to the superclasses of the class.
  
  @param method the starting method
  @param annotation the annotation to look for
  @return the method if there is a annotated method, else null