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 FieldSetJoinPointRedefiner extends FieldSetJoinPointCompiler { 18 21 private final CompilationInfo.Model m_redefinedModel; 22 23 28 FieldSetJoinPointRedefiner(final CompilationInfo model) { 29 super(model.getInitialModel()); 30 m_redefinedModel = model.getRedefinedModel(); 31 } 32 33 36 protected void createInvokeMethod() { 37 String invokeDesc = buildInvokeMethodSignature(); 38 MethodVisitor cv = m_cw.visitMethod( 39 ACC_PUBLIC + ACC_FINAL + ACC_STATIC, 40 INVOKE_METHOD_NAME, 41 invokeDesc, 42 null, 43 new String []{ 44 THROWABLE_CLASS_NAME 45 } 46 ); 47 AsmHelper.loadArgumentTypes(cv, Type.getArgumentTypes(invokeDesc), true); 48 cv.visitMethodInsn(INVOKESTATIC, m_redefinedModel.getJoinPointClassName(), INVOKE_METHOD_NAME, invokeDesc); 49 AsmHelper.addReturnStatement(cv, Type.getReturnType(invokeDesc)); 50 cv.visitMaxs(0, 0); 51 } 52 53 56 protected void createInlinedInvokeMethod() { 57 createInvokeMethod(); 58 } 59 60 } 61 | Popular Tags |