>>68
こんな寛治?
---------------- HelloWorld.java ----------------
package ajtest.helloworld2;
import java.io.*;

class HelloWorld {
 PrintWriter pw;
 void printMessage() {
  pw.println("Hello world!");
 }
 public static void main(String[] args) {
  new HelloWorld().printMessage();
 }
}

---------------- Trace.java ----------------
package ajtest.helloworld2;
import java.io.*;

aspect Trace {
 pointcut printouts(HelloWorld hw):
  instanceof(hw) && receptions(void printMessage());

 before(HelloWorld hw): printouts(hw) {
  try {
   hw.pw = new PrintWriter(new FileWriter("temp.txt"));
  } catch (IOException ioExcp) {}
 }
 after(HelloWorld hw): printouts(hw) {
  hw.pw.flush();
  hw.pw.close();
 }
}

--------------------------------------------
血がってます?(だったらスマソ。)