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

Print this page

        

*** 86,101 **** // More complicated security check cache needed here than for // Class.newInstance() and Constructor.newInstance() private Class securityCheckCache; private Class securityCheckTargetClassCache; - // Modifiers that can be applied to a method in source code - private static final int LANGUAGE_MODIFIERS = - Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | - Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | - Modifier.SYNCHRONIZED | Modifier.NATIVE; - // Generics infrastructure private String getGenericSignature() {return signature;} // Accessor for factory --- 86,95 ----
*** 406,421 **** * <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}. */ public String toString() { try { StringBuffer sb = new StringBuffer(); ! int mod = getModifiers() & LANGUAGE_MODIFIERS; if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } sb.append(Field.getTypeName(getReturnType()) + " "); sb.append(Field.getTypeName(getDeclaringClass()) + "."); --- 400,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}. */ public String toString() { try { StringBuffer sb = new StringBuffer(); ! int mod = getModifiers() & Modifier.methodModifiers(); if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } sb.append(Field.getTypeName(getReturnType()) + " "); sb.append(Field.getTypeName(getDeclaringClass()) + ".");
*** 471,491 **** * <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}. * * @return a string describing this {@code Method}, * include type parameters * * @since 1.5 */ public String toGenericString() { try { StringBuilder sb = new StringBuilder(); ! int mod = getModifiers() & LANGUAGE_MODIFIERS; if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } TypeVariable<?>[] typeparms = getTypeParameters(); if (typeparms.length > 0) { --- 465,485 ---- * <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 */ public String toGenericString() { try { StringBuilder sb = new StringBuilder(); ! int mod = getModifiers() & Modifier.methodModifiers(); if (mod != 0) { sb.append(Modifier.toString(mod) + " "); } TypeVariable<?>[] typeparms = getTypeParameters(); if (typeparms.length > 0) {