org.aspectj/tests/bugs152/pr135865/A.java
2006-05-17 12:15:23 +00:00

21 lines
456 B
Java

import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME) @interface Ann {}
aspect Aspect {
before() : call(@Ann * *(..)) {
System.out.println("\tJoin point: " + thisJoinPointStaticPart);
}
// Methods with out the Ann annotation but in an Ann annotated type get Ann
declare @method: !@Ann * (@Ann *).*(..) : @Ann;
}
public class A {
void foo() { new B().foo(); }
public static void main(String[] args) { new A().foo(); }
}