接口的使用
org.aopalliance.intercept.MethodInvocation
使用MethodInvocation的程序包
程序包
说明
Aspect Programming
AspectJ integration package.
Classes enabling AspectJ 5 @Annotated classes to be used in Framework AOP.
Package containing Infra basic AOP infrastructure, compliant with the
AOP Alliance interfaces.
SPI package allowing AOP framework to handle arbitrary advice types.
Provides miscellaneous interceptor implementations.
-
infra.aop中MethodInvocation的使用
修饰符和类型接口说明interfaceExtension of the AOP AllianceMethodInvocationinterface, allowing access to the proxy that the method invocation was made through.返回MethodInvocation的infra.aop中的方法修饰符和类型方法说明ProxyMethodInvocation.invocableClone()Create a clone of this object.ProxyMethodInvocation.invocableClone(Object... arguments) Create a clone of this object.参数类型为MethodInvocation的infra.aop中的方法修饰符和类型方法说明voidAfterReturningAdvice.afterReturning(Object returnValue, MethodInvocation invocation) Callback after a given method successfully returned.voidMethodBeforeAdvice.before(MethodInvocation invocation) Callback before a given method is invoked.booleanMethodMatcher.IntersectionMethodMatcher.matches(MethodInvocation invocation) booleanMethodMatcher.matches(MethodInvocation invocation) Check whether there a runtime (dynamic) match for this method, which must have matched statically.booleanMethodMatcher.NegateMethodMatcher.matches(MethodInvocation invocation) booleanMethodMatcher.UnionMethodMatcher.matches(MethodInvocation invocation) static booleanPointcut.matches(Pointcut pointcut, MethodInvocation invocation) Perform the least expensive check for a pointcut match.booleanTrueMethodMatcher.matches(MethodInvocation invocation) -
infra.aop.aspectj中MethodInvocation的使用
参数类型为MethodInvocation的infra.aop.aspectj中的方法修饰符和类型方法说明voidAspectJAfterReturningAdvice.afterReturning(Object returnValue, MethodInvocation invocation) voidAspectJMethodBeforeAdvice.before(MethodInvocation invocation) AspectJAfterAdvice.invoke(MethodInvocation mi) AspectJAfterThrowingAdvice.invoke(MethodInvocation mi) AspectJAroundAdvice.invoke(MethodInvocation mi) booleanAspectJExpressionPointcut.matches(MethodInvocation invocation) -
infra.aop.aspectj.annotation中MethodInvocation的使用
修饰符和类型方法说明booleanInstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut.matches(MethodInvocation invocation) -
infra.aop.framework中MethodInvocation的使用
修饰符和类型类说明classImplemented basicAbstractMethodInvocation.proceed()logic(专用程序包) static classImplementation of AOP Alliance MethodInvocation used by this AOP proxy.class修饰符和类型方法说明AbstractMethodInvocation.invocableClone()This implementation returns a shallow copy of this invocation object, including an independent copy of the original arguments array.AbstractMethodInvocation.invocableClone(Object... arguments) This implementation returns a shallow copy of this invocation object, using the given arguments array for the clone. -
infra.aop.framework.adapter中MethodInvocation的使用
修饰符和类型方法说明AfterReturningAdviceInterceptor.invoke(MethodInvocation mi) MethodBeforeAdviceInterceptor.invoke(MethodInvocation mi) ThrowsAdviceInterceptor.invoke(MethodInvocation mi) private voidThrowsAdviceInterceptor.invokeHandlerMethod(MethodInvocation mi, Throwable ex, Method method) -
infra.aop.interceptor中MethodInvocation的使用
类型参数类型为MethodInvocation的infra.aop.interceptor中的字段修饰符和类型字段说明private static final ThreadLocal<MethodInvocation>ExposeInvocationInterceptor.invocation修饰符和类型方法说明static MethodInvocationExposeInvocationInterceptor.currentInvocation()Return the AOP Alliance MethodInvocation object associated with the current invocation.参数类型为MethodInvocation的infra.aop.interceptor中的方法修饰符和类型方法说明private static voidCustomizableTraceInterceptor.appendArgumentTypes(MethodInvocation methodInvocation, Matcher matcher, StringBuilder output) Adds a comma-separated list of the shortClassnames of the method argument types to the output.private static voidCustomizableTraceInterceptor.appendReturnValue(MethodInvocation methodInvocation, Matcher matcher, StringBuilder output, Object returnValue) Adds theStringrepresentation of the method return value to the suppliedStringBuilder.protected StringAbstractMonitoringInterceptor.createInvocationTraceName(MethodInvocation invocation) Create aStringname for the givenMethodInvocationthat can be used for trace/logging purposes.static StringExposeBeanNameAdvisors.getBeanName(MethodInvocation mi) Find the bean name for the given invocation.protected StringDebugInterceptor.getInvocationDescription(MethodInvocation invocation) protected StringSimpleTraceInterceptor.getInvocationDescription(MethodInvocation invocation) Return a description for the given method invocation.protected infra.logging.LoggerAbstractTraceInterceptor.getLoggerForInvocation(MethodInvocation invocation) Return the appropriateLoggerinstance to use for the givenMethodInvocation.AbstractTraceInterceptor.invoke(MethodInvocation invocation) Determines whether or not logging is enabled for the particularMethodInvocation.AsyncExecutionInterceptor.invoke(MethodInvocation invocation) Intercept the given method invocation, submit the actual calling of the method to the correct task executor and return immediately to the caller.ConcurrencyThrottleInterceptor.invoke(MethodInvocation methodInvocation) DebugInterceptor.invoke(MethodInvocation invocation) ExposeBeanNameAdvisors.ExposeBeanNameInterceptor.invoke(MethodInvocation mi) ExposeBeanNameAdvisors.ExposeBeanNameIntroduction.invoke(MethodInvocation mi) ExposeInvocationInterceptor.invoke(MethodInvocation mi) protected abstract ObjectAbstractTraceInterceptor.invokeUnderTrace(MethodInvocation invocation, infra.logging.Logger logger) Subclasses must override this method to perform any tracing around the suppliedMethodInvocation.protected ObjectCustomizableTraceInterceptor.invokeUnderTrace(MethodInvocation invocation, infra.logging.Logger logger) Writes a log message before the invocation based on the value ofenterMessage.protected ObjectPerformanceMonitorInterceptor.invokeUnderTrace(MethodInvocation invocation, infra.logging.Logger logger) protected ObjectSimpleTraceInterceptor.invokeUnderTrace(MethodInvocation invocation, infra.logging.Logger logger) protected booleanAbstractTraceInterceptor.isInterceptorEnabled(MethodInvocation invocation, infra.logging.Logger logger) Determine whether the interceptor should kick in, that is, whether theinvokeUnderTracemethod should be called.protected StringCustomizableTraceInterceptor.replacePlaceholders(String message, MethodInvocation methodInvocation, Object returnValue, Throwable throwable, long invocationTime) Replace the placeholders in the given message with the supplied values, or values derived from those supplied. -
infra.aop.support中MethodInvocation的使用
参数类型为MethodInvocation的infra.aop.support中的方法修饰符和类型方法说明protected ObjectDelegatePerTargetObjectIntroductionInterceptor.doProceed(MethodInvocation mi) Proceed with the suppliedMethodInterceptor.protected ObjectDelegatingIntroductionInterceptor.doProceed(MethodInvocation mi) Proceed with the suppliedMethodInterceptor.static Class<?>AopUtils.getTargetClass(MethodInvocation invocation) Determine the target class of the given invocation.protected Class<?>DynamicMethodMatcher.getTargetClass(MethodInvocation invocation) DelegatePerTargetObjectIntroductionInterceptor.invoke(MethodInvocation mi) Subclasses may need to override this if they want to perform custom behaviour in around advice.DelegatingIntroductionInterceptor.invoke(MethodInvocation mi) Subclasses may need to override this if they want to perform custom behaviour in around advice.RuntimeMethodInterceptor.invoke(MethodInvocation invocation) protected final booleanIntroductionInfoSupport.isMethodOnIntroducedInterface(MethodInvocation mi) Is this method on an introduced interface?booleanControlFlowPointcut.matches(MethodInvocation invocation) booleanStaticMethodMatcher.matches(MethodInvocation invocation) -
org.aopalliance.intercept中MethodInvocation的使用
修饰符和类型方法说明MethodInterceptor.invoke(MethodInvocation invocation) Implement this method to perform extra treatments before and after the invocation.