--- /dev/null
+/**
+ *
+ */
+package pack;
+
+public aspect A {
+
+ declare warning : (get(* System.out) || get(* System.err)) : "There should be no printlns";
+
+ pointcut p() : call(* C.method2(..));
+
+ before() : p() {
+ System.out.println("blah");
+ }
+
+}
--- /dev/null
+package pack;
+
+public class C {
+
+ public void method1() {
+ System.out.println("blah");
+ method2();
+ }
+
+ public void method2() {
+ System.out.println("blah");
+ }
+
+ public void method3() {
+ System.out.println("blah");
+ }
+
+}
--- /dev/null
+package pack;
+
+public class C {
+
+ public void method1() {
+ System.out.println("blah");
+ method2();
+ }
+
+ public void method2() {
+// System.out.println("blah");
+ }
+
+ public void method3() {
+ System.out.println("blah");
+ }
+
+}
--- /dev/null
+package pack;
+
+public class C {
+
+ public void method1() {
+ System.out.println("blah");
+ method2();
+ }
+
+ public void method2() {
+ System.out.println("blah");
+ }
+
+ public void method3() {
+ System.out.println("blah");
+ }
+
+}
--- /dev/null
+package pack;
+
+public aspect A {
+
+ pointcut p() : call(* C.method2(..));
+
+ before() : p() {
+ }
+
+}
--- /dev/null
+package pack;
+
+public class C {
+
+ public void method1() {
+ method2();
+ }
+
+ public void method2() {
+ }
+
+ public void method3() {
+ method2();
+ }
+
+}
--- /dev/null
+package pack;
+
+public class C {
+
+ public void method1() {
+// method2();
+ }
+
+ public void method2() {
+ }
+
+ public void method3() {
+ method2();
+ }
+
+}
--- /dev/null
+package pkg;
+
+public aspect A {
+
+ pointcut p() : call(* foo(..));
+
+ before() : p() { }
+
+
+ declare warning: call (* goo(..)): "goo called!!";
+}
+
--- /dev/null
+package pkg;
+
+public class C {
+
+ public void method(){
+ new C().foo();
+ new C().goo();
+ }
+
+ public void foo() { }
+ public void goo() { }
+}
--- /dev/null
+package pkg;
+
+public aspect A {
+
+ pointcut p() : call(* foo(..));
+
+ before() : p() { }
+
+
+
+
+ declare warning: call (* goo(..)): "goo called!!";
+}
+
--- /dev/null
+package pkg;
+
+public aspect A {
+
+ pointcut p() : call(* foo(..));
+
+ before() : p() { }
+
+
+
+
+ declare warning: call (* goo(..)): "goo called!!";
+}
+
--- /dev/null
+package pkg;
+
+public class C {
+
+ public void method(){
+ new C().foo();
+ new C().goo();
+ }
+
+ public void foo() { }
+ public void goo() { }
+}