--- /dev/null
+package a;
+
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class MyAspect {
+ //before(): call(* print(..)) {
+ @Before("call(* print(..))")
+ public void m() {
+ System.out.println("advice running");
+ }
+}
--- /dev/null
+package a;
+
+public class MyClass {
+ public static void main(String []argv) {
+ new MyClass().print("hello");
+ new MyClass().print("world");
+ }
+
+ public void print(String msg) {
+ System.out.println(msg);
+ }
+}
--- /dev/null
+<aspectj>
+ <weaver>
+ <exclude within="a..MyAspect"/>
+ </weaver>
+ <aspects>
+ <aspect name="a.MyAspect"/>
+ </aspects>
+</aspectj>