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