예제 #1
0
    private boolean hasParamAnnotation(Method method) {
      Annotation[][] paramAnnotationArrays = method.getParameterAnnotations();
      for (Annotation[] paramAnnotations : paramAnnotationArrays)
        for (Annotation paramAnnotation : paramAnnotations)
          if (paramAnnotation.annotationType().isAssignableFrom(Param.class)) return true;

      return false;
    }
예제 #2
0
 public static boolean hasAnnotation(Annotation[] anns, Class<? extends Annotation> clazz) {
   for (Annotation ann : anns) {
     if (clazz == ann.annotationType()) {
       return true;
     }
   }
   return false;
 }