code: private static void addNoInterfaceEqualsMethod(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);
          GeneratorAdapter mg = new GeneratorAdapter(mv, ACC_PUBLIC, "equals", desc);
          mg.visitCode();
  
          // -----------------------------------------------------------------------
          //    if (other instanceof type)
          //    {
          // -----------------------------------------------------------------------
          mg.loadArg(0);
          mg.visitTypeInsn(INSTANCEOF, implClassName);
          Label if_instanceofType_End = new Label();
          mg.visitJumpInsn(IFEQ, if_instanceofType_End);
  
          // -----------------------------------------------------------------------
          //       return this.ivWrapperBase.equals(((type)other).ivWrapperBase)
          // -----------------------------------------------------------------------
          loadWrapperBase(mg, implClassName, LOCAL_BEAN);
          mg.loadArg(0);
          mg.visitTypeInsn(CHECKCAST, implClassName);
          mv.visitFieldInsn(GETFIELD, implClassName, LOCAL_BEAN_WRAPPER_FIELD,
                            LOCAL_BEAN_WRAPPER_FIELD_TYPE);
          mg.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object",
                             "equals",
                             desc);
          mg.returnValue();
  
          // -----------------------------------------------------------------------
          //    }
          // -----------------------------------------------------------------------
          mg.visitLabel(if_instanceofType_End);
  
          // -----------------------------------------------------------------------
          //    return false;
          // -----------------------------------------------------------------------
          mg.push(false);
          mg.returnValue();
  
          // -----------------------------------------------------------------------
          // }
          // -----------------------------------------------------------------------
          mg.endMethod();
          mg.visitEnd();
      }
docs: d583041