class ServletContextAdapter extends ClassVisitor {

  @Override
  public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
    if ((access & (ACC_STATIC | ACC_PUBLIC)) == ACC_PUBLIC
        && "addListener".equals(name)
        && ("(Ljava/lang/Object;)V".equals(desc) || "(Ljava/util/EventListener;)V".equals(desc))) {
      debug("modifying addListener(...) method for %s", className);
      MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
      return new EnahceAddListener(mv);
    }
    // Enhance static initializer if present
    if ("<clinit>".equals(name) && !addedStaticInit) {
      MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
      return new EnhanceStaticInit(mv);
    }
    return super.visitMethod(access, name, desc, signature, exceptions);
  }

  public  ServletContextAdapter(ClassVisitor cv);

}