1 8 package org.codehaus.aspectwerkz.transform.inlining.compiler; 9 10 import org.objectweb.asm.CodeVisitor; 11 import org.objectweb.asm.Type; 12 13 import org.codehaus.aspectwerkz.transform.inlining.AsmHelper; 14 15 21 public class MethodExecutionJoinPointRedefiner extends MethodExecutionJoinPointCompiler { 22 23 26 private final CompilationInfo.Model m_redefinedModel; 27 28 33 MethodExecutionJoinPointRedefiner(final CompilationInfo model) { 34 super(model.getInitialModel()); 35 m_redefinedModel = model.getRedefinedModel(); 36 } 37 38 41 protected void createInvokeMethod() { 42 String invokeDesc = buildInvokeMethodSignature(); 43 CodeVisitor cv = m_cw.visitMethod( 44 ACC_PUBLIC + ACC_FINAL + ACC_STATIC, 45 INVOKE_METHOD_NAME, 46 invokeDesc, 47 new String []{ 48 THROWABLE_CLASS_NAME 49 }, 50 null 51 ); 52 AsmHelper.loadArgumentTypes(cv, Type.getArgumentTypes(invokeDesc), true); 53 cv.visitMethodInsn(INVOKESTATIC, m_redefinedModel.getJoinPointClassName(), INVOKE_METHOD_NAME, invokeDesc); 54 AsmHelper.addReturnStatement(cv, Type.getReturnType(invokeDesc)); 55 cv.visitMaxs(0, 0); 56 } 57 58 61 protected void createInlinedInvokeMethod() { 62 createInvokeMethod(); 63 } 64 } 65 | Popular Tags |