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

Print this page

        

*** 340,352 **** * * <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 */ --- 340,351 ---- * * <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 default}, {@code static}, {@code final}, ! * {@code synchronized}, {@code native}, {@code strictfp}. * * @return a string describing this {@code Method} * * @jls 8.4.3 Method Modifiers */
*** 357,368 **** exceptionTypes); } @Override void specificToStringHeader(StringBuilder sb) { ! sb.append(Field.getTypeName(getReturnType())).append(' '); ! sb.append(Field.getTypeName(getDeclaringClass())).append('.'); sb.append(getName()); } /** * Returns a string describing this {@code Method}, including --- 356,367 ---- exceptionTypes); } @Override void specificToStringHeader(StringBuilder sb) { ! sb.append(getReturnType().getTypeName()).append(' '); ! sb.append(getDeclaringClass().getTypeName()).append('.'); sb.append(getName()); } /** * Returns a string describing this {@code Method}, including
*** 385,404 **** * type parameters, the type parameter list is elided; if the type * parameter list is present, a space separates the list from the * class name. If the method is declared to throw exceptions, the * parameter list is followed by a space, followed by the word * throws followed by a comma-separated list of the generic thrown ! * exception types. If there are no type parameters, the type ! * parameter list is elided. * * <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 --- 384,401 ---- * type parameters, the type parameter list is elided; if the type * parameter list is present, a space separates the list from the * class name. If the method is declared to throw exceptions, the * parameter list is followed by a space, followed by the word * throws followed by a comma-separated list of the generic thrown ! * exception types. * * <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 default}, {@code static}, {@code final}, ! * {@code synchronized}, {@code native}, {@code strictfp}. * * @return a string describing this {@code Method}, * include type parameters * * @since 1.5
*** 411,425 **** } @Override void specificToGenericStringHeader(StringBuilder sb) { Type genRetType = getGenericReturnType(); ! sb.append( ((genRetType instanceof Class<?>)? ! Field.getTypeName((Class<?>)genRetType):genRetType.toString())) ! .append(' '); ! sb.append(Field.getTypeName(getDeclaringClass())).append('.'); sb.append(getName()); } /** * Invokes the underlying method represented by this {@code Method} --- 408,420 ---- } @Override void specificToGenericStringHeader(StringBuilder sb) { Type genRetType = getGenericReturnType(); ! sb.append(genRetType.getTypeName()).append(' '); ! sb.append(getDeclaringClass().getTypeName()).append('.'); sb.append(getName()); } /** * Invokes the underlying method represented by this {@code Method}