org.opends.server.loggers.debug
Class DebugAspect

java.lang.Object
  extended by org.opends.server.loggers.debug.DebugAspect

public class DebugAspect
extends java.lang.Object

An aspect for source-code tracing at the method level. One DebugLogger aspect instance exists for each Java class using tracing. Tracer must be registered with the DebugLogger. Logging is always done at a level basis, with debug log messages exceeding the trace threshold being traced, others being discarded.


Constructor Summary
DebugAspect()
           
 
Method Summary
static boolean shouldTrace()
          Pointcut for matching only if there are publishers.
 void traceConstructor(org.aspectj.lang.JoinPoint thisJoinPoint)
          AspectJ Implementation.
 void traceNonStaticMethodEntry(org.aspectj.lang.JoinPoint thisJoinPoint, java.lang.Object obj)
          AspectJ Implementation.
 void traceReturn(org.aspectj.lang.JoinPoint.StaticPart thisJoinPointStaticPart, java.lang.Object ret)
          AspectJ Implementation.
 void traceStaticMethodEntry(org.aspectj.lang.JoinPoint thisJoinPoint)
          AspectJ Implementation.
 void traceThrown(org.aspectj.lang.JoinPoint.StaticPart thisJoinPointStaticPart, java.lang.Throwable ex)
          AspectJ Implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugAspect

public DebugAspect()
Method Detail

shouldTrace

public static boolean shouldTrace()
Pointcut for matching only if there are publishers.

Returns:
if debug logging is enabled.

traceConstructor

public void traceConstructor(org.aspectj.lang.JoinPoint thisJoinPoint)
AspectJ Implementation.

Parameters:
thisJoinPoint - the JoinPoint reflection object.

traceNonStaticMethodEntry

public void traceNonStaticMethodEntry(org.aspectj.lang.JoinPoint thisJoinPoint,
                                      java.lang.Object obj)
AspectJ Implementation.

Parameters:
thisJoinPoint - the JoinPoint reflection object.
obj - the object this method operations on.

traceStaticMethodEntry

public void traceStaticMethodEntry(org.aspectj.lang.JoinPoint thisJoinPoint)
AspectJ Implementation.

Parameters:
thisJoinPoint - the JoinPoint reflection object.

traceReturn

public void traceReturn(org.aspectj.lang.JoinPoint.StaticPart thisJoinPointStaticPart,
                        java.lang.Object ret)
AspectJ Implementation.

Parameters:
thisJoinPointStaticPart - the JoinPoint reflection object.
ret - the return value of the method.

traceThrown

public void traceThrown(org.aspectj.lang.JoinPoint.StaticPart thisJoinPointStaticPart,
                        java.lang.Throwable ex)
AspectJ Implementation.

Parameters:
thisJoinPointStaticPart - the JoinPoint reflection object.
ex - the exception thrown.