void findAnnotatedArguments(MethodInvocation methodInvocation) { Method method = methodInvocation.getMethod(); checkArgument( method.isAnnotationPresent(RequiresPermission.class), "Unexpected method passed to the Interceptor: %s", method); Object[] methodArguments = methodInvocation.getArguments(); Type[] genericParameterTypes = method.getGenericParameterTypes(); Annotation[][] annotationsOfParameters = method.getParameterAnnotations(); for (int i = 0; i < annotationsOfParameters.length; i++) { Annotation[] annotationsOfParameter = annotationsOfParameters[i];for (Annotation annotation : annotationsOfParameter) {if (Named.class.isInstance(annotation)) {... do whatever you want}}} }
--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-guice/-/FjI8kHjOB9oJ.
To post to this group, send email to google...@googlegroups.com.
To unsubscribe from this group, send email to google-guice...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
Yes, something like this:
To unsubscribe from this group, send email to google-guice+unsubscribe@googlegroups.com.