aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs174/pr418129/Target.java
blob: a3d1b2e97073439ab1a6f8ce6732ae7d53310125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.lang.annotation.*;

interface Behavior { 
String hello(); 
}

aspect Trait {
 //   public String Behavior.name;
	
	public String Behavior.hello() {
		return "hello";
	}
}

public class Target implements Behavior {
	public static aspect A {
//		declare @field: * Target.name: @Tagged; // NO WORKY
		declare @method: * Target.hello(..): @Tagged; // NO WORKY
	}

    public static void main(String []argv) throws Exception {
      System.out.println(Target.class.getDeclaredMethod("hello").getDeclaredAnnotations()[0]);
    }
}

@Retention(RetentionPolicy.RUNTIME)
@interface Tagged {}