1 package ch.ethz.prose.crosscut; 22 import java.lang.IllegalAccessException ; 23 import ch.ethz.jvmai.JoinPoint; 24 import java.lang.Object ; 25 import java.lang.reflect.InvocationTargetException ; 26 33 class WildcardConcreteMcutAdvice extends McutAdvice 34 { 35 private final MethodCut methodCut; 36 protected void allocStackArgs(int expectedLength) 37 { 38 stackArgsLength = advice.getLength(); 39 stackArgs= new Object [stackArgsLength]; 40 } 41 42 43 WildcardConcreteMcutAdvice(MethodCut methodCut, JoinPoint m, MethodCutSignaturePattern a) 44 { 45 super(methodCut, m,a); 46 this.methodCut = methodCut; 47 } 48 49 57 protected void execute() throws IllegalAccessException , InvocationTargetException 58 { 59 ANY adviceThis = new ANY(); 60 adviceThis.setObject(stackArgs[0]); 61 stackArgs[0]=adviceThis; 62 advice.methodObj.invoke(methodCut,stackArgs); 63 } 64 } 65 | Popular Tags |