--- /dev/null
+package pkg;
+
+aspect A1 {
+
+}
--- /dev/null
+package pkg;
+
+public aspect A10 {
+
+ pointcut p() : call(public void C.m2());
+
+ before() : p() {
+
+ }
+
+}
+
+class C {
+
+ public void m1() {
+ new C().m2();
+ }
+
+ public void m2() {
+
+ }
+}
--- /dev/null
+package pkg;
+
+public aspect A11 {
+
+ declare warning: call(* C.setX(..)): "Illegal call.";
+ declare warning : execution(* C.setX(..)) : "blah";
+}
+
+class C {
+
+ public void setX() {
+ }
+
+ public void method() {
+ new C().setX();
+ }
+
+}
--- /dev/null
+package pkg;
+
+aspect A {
+
+ declare @type : C : @MyAnnotation;
+ declare @field : int C.someField : @MyAnnotation;
+ declare @method : public void C.method1() : @MyAnnotation;
+ declare @constructor : C.new() : @MyAnnotation;
+
+}
+
+class C {
+
+ public C() {
+ }
+
+ int someField = 3;
+
+ public void method1() {
+ }
+
+}
+
+@interface MyAnnotation{}
--- /dev/null
+package pkg;
+
+aspect A13 {
+
+ public C.new(int i,String s) {
+ }
+
+}
+
+class C {
+
+}
--- /dev/null
+package pkg;
+
+aspect A2 {
+
+ before() : execution(* *.*(..)) {
+ }
+
+}
--- /dev/null
+package pkg;
+
+aspect A3 {
+
+ before() : execution(* *.*(..)) {
+ }
+
+}
+
+class C {
+
+ public void method1() {
+ }
+
+}
--- /dev/null
+package pkg;
+
+aspect A4 {
+
+ pointcut p() : execution(* *.*(..));
+
+}
--- /dev/null
+package pkg;
+
+aspect A5 {
+
+ pointcut p() : execution(* *.*(..));
+
+ before() : p() {
+ }
+
+ before() : p() {
+ }
+}
--- /dev/null
+aspect A6 {
+
+ pointcut p(Integer value) : set(Integer memory) && args(value);
+
+}
--- /dev/null
+package pkg;
+
+public aspect A7 {
+
+ declare parents : C1 implements C2;
+
+ declare parents : C4 extends C5;
+
+}
+
+class C1 {
+}
+
+interface C2 {
+}
+
+class C4 {
+}
+
+class C5 {
+}
--- /dev/null
+package pkg;
+
+public aspect A8 {
+
+ pointcut p(Integer value) : set(Integer memory) && args(value);
+
+ after(Integer value) returning : p(value) {
+ }
+
+}
--- /dev/null
+package pkg;
+
+public aspect A9 {
+
+ public int C.x = 5;
+
+ private void C.method() {
+ }
+
+ public String C.methodWithArgs(int i) {
+ return "";
+ }
+}
+
+class C {
+}
--- /dev/null
+package pkg;
+
+public class C {
+
+ public C() {
+ }
+
+ public C(String s) {
+
+ }
+}
+
+interface MyInterface {
+
+}
--- /dev/null
+aspect DeclareWarnings {
+
+ pointcut p() : execution(* C.amethod());
+
+ declare warning : p() : "warning 1";
+ declare warning : p() : "warning 2";
+ declare warning : p() : "warning 3";
+ declare warning : p() : "warning 4";
+ declare warning : p() : "warning 5";
+ declare warning : p() : "warning 6";
+ declare warning : p() : "warning 7";
+ declare warning : p() : "warning 8";
+ declare warning : p() : "warning 9";
+ declare warning : p() : "warning 10";
+
+}
+
+class C {
+
+ public void amethod() {}
+}
--- /dev/null
+package tjp;
+
+import java.io.*;
+
+public class Demo {
+ static Demo d;
+
+ static {
+ }
+
+ {
+ }
+
+ public static void main(String[] args){
+ }
+
+ public void m(int[] args) {
+ }
+
+ void go(){
+ int i = 4;
+ }
+
+ void foo(int i, Object o){
+ }
+
+ String bar (Integer j){
+ return "";
+ }
+
+ public void m2(String s1, String s2) {
+ }
+}
--- /dev/null
+package pkg;
+
+public enum E {
+ A,B;
+}
--- /dev/null
+aspect TwoNamedPointcuts {
+
+ pointcut p1() : execution(* C.method1());
+
+ pointcut p2() : execution(* C.method2());
+
+ before() : p1() || p2() {
+ System.out.println("before...");
+ }
+
+}
+
+class C {
+
+ public void method1() {
+ }
+
+ public void method2() {
+ }
+
+}
--- /dev/null
+package pkg;
+
+import java.util.List;
+
+public class Java5Class {
+
+ public void method2(List l) {
+ }
+
+ public void genericMethod1(List<String> s) {
+ }
+
+ public void genericMethod2(List<String> s, MyGenericClass<Integer> m) {
+ }
+
+ public void genericMethod3(int i, List<String> s) {
+ }
+
+ public void genericMethod4(MyGenericClass2<String,Integer> m) {}
+}
+
+class MyGenericClass<T> {}
+
+class MyGenericClass2<X,Y> {}
--- /dev/null
+package pkg;
+
+public @interface MyAnnotation {
+}