src/share/classes/java/lang/reflect/Method.java

Print this page

        

*** 341,354 **** * <p>The access modifiers are placed in canonical order as * specified by "The Java Language Specification". This is * {@code public}, {@code protected} or {@code private} first, * and then other modifiers in the following order: * {@code abstract}, {@code static}, {@code final}, ! * {@code synchronized}, {@code native}, {@code strictfp}. */ public String toString() { return sharedToString(Modifier.methodModifiers(), parameterTypes, exceptionTypes); } @Override --- 341,360 ---- * <p>The access modifiers are placed in canonical order as * specified by "The Java Language Specification". This is * {@code public}, {@code protected} or {@code private} first, * and then other modifiers in the following order: * {@code abstract}, {@code static}, {@code final}, ! * {@code synchronized}, {@code native}, {@code strictfp}, ! * {@code default}. ! * ! * @return a string describing this {@code Method} ! * ! * @jls 8.4.3 Method Modifiers */ public String toString() { return sharedToString(Modifier.methodModifiers(), + isDefault(), parameterTypes, exceptionTypes); } @Override
*** 387,406 **** * <p>The access modifiers are placed in canonical order as * specified by "The Java Language Specification". This is * {@code public}, {@code protected} or {@code private} first, * and then other modifiers in the following order: * {@code abstract}, {@code static}, {@code final}, ! * {@code synchronized}, {@code native}, {@code strictfp}. * * @return a string describing this {@code Method}, * include type parameters * * @since 1.5 */ @Override public String toGenericString() { ! return sharedToGenericString(Modifier.methodModifiers()); } @Override void specificToGenericStringHeader(StringBuilder sb) { Type genRetType = getGenericReturnType(); --- 393,415 ---- * <p>The access modifiers are placed in canonical order as * specified by "The Java Language Specification". This is * {@code public}, {@code protected} or {@code private} first, * and then other modifiers in the following order: * {@code abstract}, {@code static}, {@code final}, ! * {@code synchronized}, {@code native}, {@code strictfp}, ! * {@code default}. * * @return a string describing this {@code Method}, * include type parameters * * @since 1.5 + * + * @jls 8.4.3 Method Modifiers */ @Override public String toGenericString() { ! return sharedToGenericString(Modifier.methodModifiers(), isDefault()); } @Override void specificToGenericStringHeader(StringBuilder sb) { Type genRetType = getGenericReturnType();