--- old/src/java.base/share/classes/java/lang/reflect/Method.java 2014-11-30 18:51:40.787570344 +0100 +++ new/src/java.base/share/classes/java/lang/reflect/Method.java 2014-11-30 18:51:40.671572392 +0100 @@ -37,6 +37,7 @@ import java.lang.annotation.Annotation; import java.lang.annotation.AnnotationFormatError; import java.nio.ByteBuffer; +import java.util.Arrays; /** * A {@code Method} provides information about, and access to, a single method @@ -178,6 +179,27 @@ } /** + * Used by java.lang.MethodTable to optimize comparing/locating + * method signatures. + */ + boolean parameterTypesEquals(Method other) { + int len = parameterTypes.length; + if (len != other.parameterTypes.length) { + return false; + } + for (int i = 0; i < len; i++) { + if (parameterTypes[i] != other.parameterTypes[i]) { + return false; + } + } + return true; + } + + int parameterTypesHashCode() { + return Arrays.hashCode(parameterTypes); + } + + /** * {@inheritDoc} */ @Override