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; }
public static boolean hasAnnotation(Annotation[] anns, Class<? extends Annotation> clazz) { for (Annotation ann : anns) { if (clazz == ann.annotationType()) { return true; } } return false; }