Example usage for org.aspectj.lang JoinPoint toString

List of usage examples for org.aspectj.lang JoinPoint toString

Introduction

In this page you can find the example usage for org.aspectj.lang JoinPoint toString.

Prototype

String toString();

Source Link

Usage

From source file:com.github.szberes.spring.examples.aop.aspects.AspectForMethodExecution.java

License:Apache License

@Before(value = "addPointCut() && args(a,b))", argNames = "joinPoint,a,b")
public void logBefore(JoinPoint joinPoint, int a, int b) {
    LOGGER.info(joinPoint.toString() + " Params: " + a + ", " + b);
}

From source file:com.github.szberes.spring.examples.aop.aspects.AspectForMethodExecution.java

License:Apache License

@AfterReturning(value = "addPointCut()))", returning = "retVal")
public void logAfter(JoinPoint joinPoint, int retVal) {
    LOGGER.info(joinPoint.toString() + " finished: " + retVal);
}

From source file:com.octo.reactive.audit.DebugAspect.java

License:Apache License

@Before("call(* java.nio.Buffer.*(..))")
public void buffer_all(JoinPoint thisJoinPoint) {
    config.logger.finest(thisJoinPoint.toString());
}

From source file:com.octo.reactive.audit.java.io.InputStreamAudit.java

License:Apache License

@Before("call(* java.io.InputStream+.read(..))")
public void read(JoinPoint thisJoinPoint) {
    if (config.isDebug()) {
        InputStream in = (InputStream) thisJoinPoint.getTarget();
        config.logger.finest(thisJoinPoint.toString() + "  with " + FileTools.dumpChain(in));
    }//from ww  w. j  a v a2  s .  com
    latency(HIGH, thisJoinPoint, (InputStream) thisJoinPoint.getTarget());
}

From source file:com.octo.reactive.audit.java.io.OutputStreamAudit.java

License:Apache License

@Before("call(* java.io.OutputStream.write(..))")
public void write(JoinPoint thisJoinPoint) {
    OutputStream out = (OutputStream) thisJoinPoint.getTarget();
    if (config.isDebug()) {
        config.logger.finest(thisJoinPoint.toString() + "  with " + FileTools.dumpChain(out));
    }//from   w  w  w.ja va2  s  . c  o m
    latency(HIGH, thisJoinPoint, (OutputStream) thisJoinPoint.getTarget());
}

From source file:com.octo.reactive.audit.java.io.PrintWriterAudit.java

License:Apache License

@Before("call(* java.io.PrintWriter.format(..))")
public void format(JoinPoint thisJoinPoint) {
    Writer writer = (Writer) thisJoinPoint.getTarget();
    if (config.isDebug()) {
        config.logger.finest(thisJoinPoint.toString() + "  with " + FileTools.dumpChain(writer));
    }/* w ww .  j  a  v a2s.c  o  m*/
    latency(HIGH, thisJoinPoint, writer);
}

From source file:com.octo.reactive.audit.java.io.PrintWriterAudit.java

License:Apache License

@Before("call(* java.io.PrintWriter.print(..))")
public void print(JoinPoint thisJoinPoint) {
    Writer writer = (Writer) thisJoinPoint.getTarget();
    if (config.isDebug()) {
        config.logger.finest(thisJoinPoint.toString() + "  with " + FileTools.dumpChain(writer));
    }/*from   w ww .jav a 2 s  .co m*/
    latency(HIGH, thisJoinPoint, writer);
}

From source file:com.octo.reactive.audit.java.io.PrintWriterAudit.java

License:Apache License

@Before("call(* java.io.PrintWriter.printf(..))")
public void printf(JoinPoint thisJoinPoint) {
    Writer writer = (Writer) thisJoinPoint.getTarget();
    if (config.isDebug()) {
        config.logger.finest(thisJoinPoint.toString() + "  with " + FileTools.dumpChain(writer));
    }//w  w w . j a  v  a2  s  .  com
    latency(HIGH, thisJoinPoint, writer);
}

From source file:com.octo.reactive.audit.java.io.PrintWriterAudit.java

License:Apache License

@Before("call(* java.io.PrintWriter.println(..))")
public void println(JoinPoint thisJoinPoint) {
    Writer writer = (Writer) thisJoinPoint.getTarget();
    if (config.isDebug()) {
        config.logger.finest(thisJoinPoint.toString() + "  with " + FileTools.dumpChain(writer));
    }// w w w .  ja  va 2 s . c  o  m
    latency(HIGH, thisJoinPoint, writer);
}

From source file:com.octo.reactive.audit.java.io.ReaderAudit.java

License:Apache License

@Before("call(* java.io.Reader+.read(..))")
public void read(JoinPoint thisJoinPoint) {
    if (config.isDebug()) {
        Reader reader = (Reader) thisJoinPoint.getTarget();
        config.logger.finest(thisJoinPoint.toString() + "  with " + FileTools.dumpChain(reader));
    }//  w w w. j  a  v  a  2s  .c  om
    latency(HIGH, thisJoinPoint, (Reader) thisJoinPoint.getTarget());
}