User Tools

Site Tools


basics:ex1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

basics:ex1 [2007/02/23 14:36]
bdefrain created
basics:ex1 [2021/02/05 13:49]
Line 1: Line 1:
-====== 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: 
- 
-<code aspectj> 
-before(): <pointcut> { 
-  System.out.println("About to start"); 
-} 
-</code> 
- 
-<note tip> 
-You can employ the primitive pointcut ''execution(//Signature//)''. The signature should at least specify the return type, the method name and the arguments. 
-</note> 
- 
-Rerun the application to see the output from your aspect. 
- 
----- 
- 
-Continue with [[basics:ex2|Exercise 2]]. 
basics/ex1.txt ยท Last modified: 2021/02/05 13:49 (external edit)