1 4 package com.tc.aspectwerkz.transform.inlining.weaver; 5 6 import java.util.Set ; 7 8 import com.tc.asm.MethodVisitor; 9 10 import com.tc.aspectwerkz.transform.TransformationConstants; 11 import com.tc.aspectwerkz.transform.inlining.AsmNullAdapter; 12 13 19 public class AlreadyAddedMethodVisitor extends AsmNullAdapter.NullClassAdapter implements TransformationConstants { 20 21 25 private final Set m_addedMethods; 26 27 32 public AlreadyAddedMethodVisitor(final Set wrappers) { 33 m_addedMethods = wrappers; 34 } 35 36 46 public MethodVisitor visitMethod(final int access, 47 final String name, 48 final String desc, 49 final String signature, 50 final String [] exceptions) { 51 if (name.startsWith(WRAPPER_METHOD_PREFIX) || 52 name.startsWith(ORIGINAL_METHOD_PREFIX)) { 53 m_addedMethods.add(getMethodKey(name, desc)); 54 } 55 return super.visitMethod(access, name, desc, signature, exceptions); 56 } 57 58 65 static String getMethodKey(final String name, final String desc) { 66 StringBuffer sb = new StringBuffer (name); 67 return sb.append(desc).toString(); 68 } 69 } 70 | Popular Tags |