Class MethodAspect


  • final class MethodAspect
    extends java.lang.Object
    Ties a matcher to a method interceptor.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Matcher<? super java.lang.Class<?>> classMatcher  
      private java.util.List<org.aopalliance.intercept.MethodInterceptor> interceptors  
      private Matcher<? super java.lang.reflect.Method> methodMatcher  
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodAspect​(Matcher<? super java.lang.Class<?>> classMatcher, Matcher<? super java.lang.reflect.Method> methodMatcher, java.util.List<org.aopalliance.intercept.MethodInterceptor> interceptors)  
      MethodAspect​(Matcher<? super java.lang.Class<?>> classMatcher, Matcher<? super java.lang.reflect.Method> methodMatcher, org.aopalliance.intercept.MethodInterceptor... interceptors)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.util.List<org.aopalliance.intercept.MethodInterceptor> interceptors()  
      (package private) boolean matches​(java.lang.Class<?> clazz)  
      (package private) boolean matches​(java.lang.reflect.Method method)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • classMatcher

        private final Matcher<? super java.lang.Class<?>> classMatcher
      • methodMatcher

        private final Matcher<? super java.lang.reflect.Method> methodMatcher
      • interceptors

        private final java.util.List<org.aopalliance.intercept.MethodInterceptor> interceptors
    • Constructor Detail

      • MethodAspect

        MethodAspect​(Matcher<? super java.lang.Class<?>> classMatcher,
                     Matcher<? super java.lang.reflect.Method> methodMatcher,
                     java.util.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 java.lang.Class<?>> classMatcher,
                     Matcher<? super java.lang.reflect.Method> methodMatcher,
                     org.aopalliance.intercept.MethodInterceptor... interceptors)
    • Method Detail

      • matches

        boolean matches​(java.lang.Class<?> clazz)
      • matches

        boolean matches​(java.lang.reflect.Method method)
      • interceptors

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