@Test public void testEquals() { assertNotEquals(new Method("name", "()V"), null); assertNotEquals(new Method("name", "()V"), new Method("other", "()V")); assertNotEquals(new Method("name", "()V"), new Method("name", "(I)J")); assertEquals(new Method("name", "()V"), Method.getMethod("void name()")); }
@Override public boolean equals(final Object other) { if (!(other instanceof Method)) { return false; } Method otherMethod = (Method) other; return name.equals(otherMethod.name) && descriptor.equals(otherMethod.descriptor); }
Method { @Override public boolean equals(final Object other) { if (!(other instanceof Method)) { return false; } Method otherMethod = (Method) other; return name.equals(otherMethod.name) && descriptor.equals(otherMethod.descriptor); } }
Method { @Override public boolean equals(final Object other) { if (!(other instanceof Method)) { return false; } Method otherMethod = (Method) other; return name.equals(otherMethod.name) && descriptor.equals(otherMethod.descriptor); } Method(final String name, final String descriptor);  Method(final String name, final Type returnType, final Type[] argumentTypes); }
Method { @Override public boolean equals(final Object other) { if (!(other instanceof Method)) { return false; } Method otherMethod = (Method) other; return name.equals(otherMethod.name) && descriptor.equals(otherMethod.descriptor); } Method(final String name, final String descriptor);  Method(final String name, final Type returnType, final Type[] argumentTypes); static Method getMethod(final java.lang.reflect.Method method); static Method getMethod(final java.lang.reflect.Constructor<?> constructor); static Method getMethod(final String method); static Method getMethod(final String method, final boolean defaultPackage); String getName(); String getDescriptor(); Type getReturnType(); Type[] getArgumentTypes(); @Override String toString(); @Override boolean equals(final Object other); @Override int hashCode(); }
Method { @Override public boolean equals(final Object other) { if (!(other instanceof Method)) { return false; } Method otherMethod = (Method) other; return name.equals(otherMethod.name) && descriptor.equals(otherMethod.descriptor); } Method(final String name, final String descriptor);  Method(final String name, final Type returnType, final Type[] argumentTypes); static Method getMethod(final java.lang.reflect.Method method); static Method getMethod(final java.lang.reflect.Constructor<?> constructor); static Method getMethod(final String method); static Method getMethod(final String method, final boolean defaultPackage); String getName(); String getDescriptor(); Type getReturnType(); Type[] getArgumentTypes(); @Override String toString(); @Override boolean equals(final Object other); @Override int hashCode();  }