1 4 package com.tc.aspectwerkz.transform.inlining.compiler; 5 6 import com.tc.asm.MethodVisitor; 7 import com.tc.asm.Type; 8 9 import com.tc.aspectwerkz.transform.inlining.AsmHelper; 10 11 17 public class MethodExecutionJoinPointRedefiner extends MethodExecutionJoinPointCompiler { 18 19 22 private final CompilationInfo.Model m_redefinedModel; 23 24 29 MethodExecutionJoinPointRedefiner(final CompilationInfo model) { 30 super(model.getInitialModel()); 31 m_redefinedModel = model.getRedefinedModel(); 32 } 33 34 37 protected void createInvokeMethod() { 38 String invokeDesc = buildInvokeMethodSignature(); 39 MethodVisitor cv = m_cw.visitMethod( 40 ACC_PUBLIC + ACC_FINAL + ACC_STATIC, 41 INVOKE_METHOD_NAME, 42 invokeDesc, 43 null, 44 new String []{ 45 THROWABLE_CLASS_NAME 46 } 47 ); 48 AsmHelper.loadArgumentTypes(cv, Type.getArgumentTypes(invokeDesc), true); 49 cv.visitMethodInsn(INVOKESTATIC, m_redefinedModel.getJoinPointClassName(), INVOKE_METHOD_NAME, invokeDesc); 50 AsmHelper.addReturnStatement(cv, Type.getReturnType(invokeDesc)); 51 cv.visitMaxs(0, 0); 52 } 53 54 57 protected void createInlinedInvokeMethod() { 58 createInvokeMethod(); 59 } 60 } 61 | Popular Tags |