summaryrefslogtreecommitdiffstats
path: root/tests/java5/annotations/ajdkExamples/SuppressAj.aj
blob: 40a9720d31c6b4c190435a9f76cee7b7bdf23bb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  import org.aspectj.lang.annotation.SuppressAjWarnings;
  
	public aspect SuppressAj {
	
	  pointcut anInterfaceOperation() : execution(* AnInterface.*(..));
	  
	  
	  @SuppressAjWarnings // may not match if there are no implementers of the interface...
	  before() : anInterfaceOperation() {
	     // do something...
	  }		
	  
	  @SuppressAjWarnings("adviceDidNotMatch") // alternate form
	  after() returning : anInterfaceOperation() {
	  	// do something...
	  }
	}
  
  interface AnInterface {
  	 void foo();  	
  }