code: private static void addClassProxyEqualsMethod(ClassWriter cw,
                                                    String implClassName)
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, INDENT + "adding method : equals (Ljava/lang/Object;)Z");
  
          // -----------------------------------------------------------------------
          // public boolean equals(Object other)
          // {
          // -----------------------------------------------------------------------
          final String desc = "(Ljava/lang/Object;)Z";
          MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "equals", desc, null, null);
          mv.visitCode();
  
          // -----------------------------------------------------------------------
          //    if (other instanceof type)
          //    {
          // -----------------------------------------------------------------------
          mv.visitVarInsn(ALOAD, 0);
          mv.visitTypeInsn(INSTANCEOF, implClassName);
          Label if_instanceofType_End = new Label();
          mv.visitJumpInsn(IFEQ, if_instanceofType_End);
  
          // -----------------------------------------------------------------------
          //       return this.ivProxy.equals(((type)other).ivProxy)
          // -----------------------------------------------------------------------
          mv.visitVarInsn(ALOAD, 0);
          mv.visitFieldInsn(GETFIELD, implClassName,
                            LOCAL_BEAN_PROXY_FIELD, LOCAL_BEAN_PROXY_FIELD_TYPE_NAME);
          mv.visitVarInsn(ALOAD, 1);
          mv.visitTypeInsn(CHECKCAST, implClassName);
          mv.visitFieldInsn(GETFIELD, implClassName,
                            LOCAL_BEAN_PROXY_FIELD, LOCAL_BEAN_PROXY_FIELD_TYPE_NAME);
          mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object",
                             "equals", desc);
          mv.visitInsn(IRETURN);
  
          // -----------------------------------------------------------------------
          //    }
          // -----------------------------------------------------------------------
          mv.visitLabel(if_instanceofType_End);
  
          // -----------------------------------------------------------------------
          //    return false;
          // -----------------------------------------------------------------------
          mv.visitInsn(ICONST_0);
          mv.visitInsn(IRETURN);
  
          // -----------------------------------------------------------------------
          // }
          // -----------------------------------------------------------------------
          mv.visitMaxs(2, 2);
          mv.visitEnd();
      }
docs: Adds a definition for Object.equals method for the No-Interface view
  (LocalBean).
  
  @param cw ASM ClassWriter to add the method to.
  @param implClassName name of the wrapper class being generated.