类 DebugInterceptor
java.lang.Object
infra.aop.interceptor.AbstractTraceInterceptor
infra.aop.interceptor.SimpleTraceInterceptor
infra.aop.interceptor.DebugInterceptor
- 所有已实现的接口:
Serializable,Advice,Interceptor,MethodInterceptor
AOP Alliance
MethodInterceptor that can be introduced in a chain
to display verbose information about intercepted invocations to the logger.
Logs full invocation details on method entry and method exit,
including invocation arguments and invocation count. This is only
intended for debugging purposes; use SimpleTraceInterceptor
or CustomizableTraceInterceptor for pure tracing purposes.
- 从以下版本开始:
- 3.0
- 作者:
- Rod Johnson, Juergen Hoeller, TODAY
- 另请参阅:
-
字段概要
字段从类继承的字段 infra.aop.interceptor.AbstractTraceInterceptor
defaultLogger -
构造器概要
构造器构造器说明Create a new DebugInterceptor with a static logger.DebugInterceptor(boolean useDynamicLogger) Create a new DebugInterceptor with dynamic or static logger, according to the given flag. -
方法概要
修饰符和类型方法说明longgetCount()Return the number of times this interceptor has been invoked.protected StringgetInvocationDescription(MethodInvocation invocation) Return a description for the given method invocation.invoke(MethodInvocation invocation) Determines whether or not logging is enabled for the particularMethodInvocation.voidReset the invocation count to zero.从类继承的方法 infra.aop.interceptor.SimpleTraceInterceptor
invokeUnderTrace从类继承的方法 infra.aop.interceptor.AbstractTraceInterceptor
getClassForLogging, getLoggerForInvocation, isInterceptorEnabled, isLogEnabled, setHideProxyClassNames, setLogExceptionStackTrace, setLoggerName, setUseDynamicLogger, writeToLog, writeToLog
-
字段详细资料
-
count
private volatile long count
-
-
构造器详细资料
-
DebugInterceptor
public DebugInterceptor()Create a new DebugInterceptor with a static logger. -
DebugInterceptor
public DebugInterceptor(boolean useDynamicLogger) Create a new DebugInterceptor with dynamic or static logger, according to the given flag.- 参数:
useDynamicLogger- whether to use a dynamic logger or a static logger- 另请参阅:
-
-
方法详细资料
-
invoke
从类复制的说明:AbstractTraceInterceptorDetermines whether or not logging is enabled for the particularMethodInvocation. If not, the method invocation proceeds as normal, otherwise the method invocation is passed to theinvokeUnderTracemethod for handling.- 指定者:
invoke在接口中MethodInterceptor- 覆盖:
invoke在类中AbstractTraceInterceptor- 参数:
invocation- the method invocation joinpoint- 返回:
- the result of the call to
Joinpoint.proceed(), might be intercepted by the interceptor. - 抛出:
Throwable- if the interceptors or the target-object throws an exception.- 另请参阅:
-
getInvocationDescription
从类复制的说明:SimpleTraceInterceptorReturn a description for the given method invocation.- 覆盖:
getInvocationDescription在类中SimpleTraceInterceptor- 参数:
invocation- the invocation to describe- 返回:
- the description
-
getCount
public long getCount()Return the number of times this interceptor has been invoked. -
resetCount
public void resetCount()Reset the invocation count to zero.
-