User Tools

Site Tools


basics:ex1

This is an old revision of the document!


The Basics: Exercise 1

Create an aspect named Basics.

Inside, write an advice that prints out a string just before the execution of the start() method. Use the following form for your advice:

before(): <pointcut> {
  System.out.println("About to start");
}
You can employ the primitive pointcut execution(Signature). The signature should at least specify the return type, the method name and the arguments.

Rerun the application to see the output from your aspect.


Continue with Exercise 2.

basics/ex1.1172243379.txt.gz · Last modified: 2007/02/23 16:09 by bdefrain