String signature, String superName, String[] interfaces) {
}
public MethodVisitor visitMethod(int access, String name, String desc,
String signature, String[] exceptions) {
Signature sig = new Signature(name, desc);
if (eligableMethods.remove(sig)) {
currentMethod = sig;
return new MethodVisitor(Opcodes.ASM4) {
public void visitMethodInsn(int opcode, String owner, String name,
String desc) {
if (opcode == Opcodes.INVOKESPECIAL && currentMethod != null) {
Signature target = new Signature(name, desc);
// If the target signature is the same as the current,
// we shouldn't change our bridge becaues invokespecial
// is the only way to make progress (otherwise we'll
// get infinite recursion). This would typically
// only happen when a bridge method is created to widen
// the visibility of a superclass' method.
if (!target.equals(currentMethod)) {
resolved.put(currentMethod, target);
}
currentMethod = null;
}
}