Class MethodAspect

java.lang.Object
com.google.inject.internal.MethodAspect

final class MethodAspect extends Object
Ties a matcher to a method interceptor.
  • Field Details

    • classMatcher

      private final Matcher<? super Class<?>> classMatcher
    • methodMatcher

      private final Matcher<? super Method> methodMatcher
    • interceptors

      private final List<org.aopalliance.intercept.MethodInterceptor> interceptors
  • Constructor Details

    • MethodAspect

      MethodAspect(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, List<org.aopalliance.intercept.MethodInterceptor> interceptors)
      Parameters:
      classMatcher - matches classes the interceptor should apply to. For example: only(Runnable.class).
      methodMatcher - matches methods the interceptor should apply to. For example: annotatedWith(Transactional.class).
      interceptors - to apply
    • MethodAspect

      MethodAspect(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, org.aopalliance.intercept.MethodInterceptor... interceptors)
  • Method Details

    • fromBinding

      static MethodAspect fromBinding(InterceptorBinding binding)
    • matches

      boolean matches(Class<?> clazz)
    • matches

      boolean matches(Method method)
    • interceptors

      List<org.aopalliance.intercept.MethodInterceptor> interceptors()