1 18 19 package org.objectweb.jac.samples.calcul; 20 21 import org.aopalliance.intercept.ConstructorInvocation; 22 import org.aopalliance.intercept.MethodInvocation; 23 import org.objectweb.jac.core.*; 24 25 public class UserDefinedWrapper extends Wrapper { 26 27 public UserDefinedWrapper(AspectComponent ac) { 28 super(ac); 29 } 30 31 51 52 public Object myWrappingMethod(Interaction interaction) { 53 Object ret=null; 54 System.out.println("Before "+interaction.method+":"+interaction.args[0]); 55 ret=proceed(interaction); 56 System.out.println("After "+interaction.method); 57 return ret; 58 } 59 60 63 public Object invoke(MethodInvocation invocation) throws Throwable { 64 return null; 66 } 67 68 71 public Object construct(ConstructorInvocation invocation) throws Throwable { 72 return null; 74 } 75 76 } 77 78 class ActionCanceledException extends Exception {} 79 80 81 82 83 84 85 86 87 | Popular Tags |