diff options
Diffstat (limited to 'weaver/testsrc/fluffy/Aspect.java')
-rw-r--r-- | weaver/testsrc/fluffy/Aspect.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/weaver/testsrc/fluffy/Aspect.java b/weaver/testsrc/fluffy/Aspect.java new file mode 100644 index 000000000..7cb35bfa4 --- /dev/null +++ b/weaver/testsrc/fluffy/Aspect.java @@ -0,0 +1,31 @@ +package fluffy; +import java.util.*; + +import org.aspectj.runtime.internal.AroundClosure; + +public class Aspect { + + public static void ignoreMe() {} + + public static void before_method_call() { + System.out.println("before"); + } + + public static void afterReturning_method_call() { + System.out.println("afterReturning"); + } + + public static void afterThrowing_method_execution(Throwable t) { + System.out.println("afterThrowing " + t); + t.printStackTrace(); + } + + public static Object aroundFun(AroundClosure c) { + System.out.println("around"); + try { + return c.run(new Object[0]); + } catch (Throwable t) { + return null; + } + } +} |