Aspectj @Around pointcut all mehtods in Java
<p>i am writing a simple timer aspect to instrument all the methods in all the packages that belong my project. But, then the return types of various methods in those classes are different and I am getting this following error...it only works for setter but not for getter...</p>

<p>Error: applying to join point that doesn't return void</p>

<p>and here is my timeraspect...</p>

<pre><code>@Around("execution(* com.myproject..*(..))")
public void log(ProceedingJoinPoint pjp) throws Throwable{


    LOG.info("TimerAspect");
    String name = pjp.getSignature().getName();
    Monitor mon = MonitorFactory.start(name);
    pjp.proceed();
    mon.stop();

    LOG.info("TimerAspect Mon" + mon);

    String printStr = mon.getLabel()+","+mon.getUnits()+","+mon.getLastValue()+","+mon.getHits()+","+mon.getAvg()+","+mon.getTotal()+","+mon.getMin()+","+mon.getMax()+","+mon.getFirstAccess()+","+mon.getLastAccess();

    File f = new File("target/stats.csv");
    BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(f, true));
    bufferedWriter.write(printStr);
    bufferedWriter.newLine();
    bufferedWriter.flush();
    bufferedWriter.close();


}
</code></pre>

<p>Any clue to resolve this is greatly appreciated.</p>

<p>Thanks</p>
