@Test public void testEquals() { Handle handle1 = new Handle(Opcodes.H_GETFIELD, "owner", "name", "descriptor", false); Handle handle2 = new Handle(Opcodes.H_GETFIELD, "owner", "name", "descriptor", false); assertEquals(handle1, handle1); assertEquals(handle1, handle2); assertNotEquals(handle1, null); assertNotEquals(handle1, new Handle(Opcodes.H_PUTFIELD, "owner", "name", "descriptor", false)); assertNotEquals(handle1, new Handle(Opcodes.H_GETFIELD, "o", "name", "descriptor", false)); assertNotEquals(handle1, new Handle(Opcodes.H_GETFIELD, "owner", "n", "descriptor", false)); assertNotEquals(handle1, new Handle(Opcodes.H_GETFIELD, "owner", "name", "d", false)); assertNotEquals(handle1, new Handle(Opcodes.H_GETFIELD, "owner", "n", "descriptor", true)); }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof Handle)) { return false; } Handle handle = (Handle) object; return tag == handle.tag && isInterface == handle.isInterface && owner.equals(handle.owner) && name.equals(handle.name) && descriptor.equals(handle.descriptor); }
Handle { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof Handle)) { return false; } Handle handle = (Handle) object; return tag == handle.tag && isInterface == handle.isInterface && owner.equals(handle.owner) && name.equals(handle.name) && descriptor.equals(handle.descriptor); } }
Handle { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof Handle)) { return false; } Handle handle = (Handle) object; return tag == handle.tag && isInterface == handle.isInterface && owner.equals(handle.owner) && name.equals(handle.name) && descriptor.equals(handle.descriptor); } @Deprecated  Handle(final int tag, final String owner, final String name, final String descriptor);  Handle(
      final int tag,
      final String owner,
      final String name,
      final String descriptor,
      final boolean isInterface); }
Handle { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof Handle)) { return false; } Handle handle = (Handle) object; return tag == handle.tag && isInterface == handle.isInterface && owner.equals(handle.owner) && name.equals(handle.name) && descriptor.equals(handle.descriptor); } @Deprecated  Handle(final int tag, final String owner, final String name, final String descriptor);  Handle(
      final int tag,
      final String owner,
      final String name,
      final String descriptor,
      final boolean isInterface); int getTag(); String getOwner(); String getName(); String getDesc(); boolean isInterface(); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString(); }
Handle { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof Handle)) { return false; } Handle handle = (Handle) object; return tag == handle.tag && isInterface == handle.isInterface && owner.equals(handle.owner) && name.equals(handle.name) && descriptor.equals(handle.descriptor); } @Deprecated  Handle(final int tag, final String owner, final String name, final String descriptor);  Handle(
      final int tag,
      final String owner,
      final String name,
      final String descriptor,
      final boolean isInterface); int getTag(); String getOwner(); String getName(); String getDesc(); boolean isInterface(); @Override boolean equals(final Object object); @Override int hashCode(); @Override String toString();  }