summaryrefslogtreecommitdiffstats
path: root/tests/java5/annotations/declare/atfield/RightTarget.aj
blob: 9a8d2c3b5892fb5d9cf7a343f0d594e7286632fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// trying to put annotations on that correctly use @Target
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) @interface FieldColoring { String value(); }

public aspect RightTarget {
  declare @field: public int * : @FieldColoring("red");
}

aspect X {
  before(): set(@FieldColoring * *) {
    System.err.println("Colored field access at "+thisJoinPoint);
  }
}