@Override protected void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... interceptors) { super.bindInterceptor(classMatcher, NoSyntheticMethodMatcher.INSTANCE.and(methodMatcher), interceptors); }
@Override protected void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... interceptors) { super.bindInterceptor(classMatcher, NoSyntheticMethodMatcher.INSTANCE.and(methodMatcher), interceptors); }
/** * Overridden version of * {@link com.google.inject.AbstractModule#bindInterceptor bindInterceptor} * that, in addition to the standard behavior, arranges for field and method injection * of each MethodInterceptor in {@code interceptors}. * @param classMatcher matches classes the interception should apply to. * For example: {@code only(Runnable.class)}. * @param methodMatcher matches methods the interception should apply to. * For example: {@code annotatedWith(Transactional.class)}. * @param methodInterceptors chain of * {@link org.aopalliance.intercept.MethodInterceptor MethodInterceptor}s * used to intercept calls. */ @Override public void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... methodInterceptors) { registerForInjection(methodInterceptors); super.bindInterceptor(classMatcher, methodMatcher, methodInterceptors); }
@Override protected void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... interceptors) { super.bindInterceptor(classMatcher, Matchers.not(SyntheticMethodMatcher.getInstance()).and(methodMatcher), interceptors); } }