basics:ex1
This is an old revision of the document!
The Basics: Exercise 1
Create the aspect 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.1172237782.txt.gz · Last modified: 2007/02/23 14:36 by bdefrain