src/java.desktop/share/classes/com/sun/beans/introspect/MethodInfo.java
author serb
Fri, 30 Nov 2018 15:54:34 -0800
changeset 52840 7644f534b60a
parent 47216 71c04702a3d5
permissions -rw-r--r--
8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder Reviewed-by: prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25566
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     1
/*
52840
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
     2
 * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
25566
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     4
 *
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    10
 *
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    15
 * accompanied this code).
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    16
 *
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    20
 *
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    23
 * questions.
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    24
 */
39008
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    25
25566
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    26
package com.sun.beans.introspect;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    27
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    28
import java.lang.reflect.Method;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    29
import java.lang.reflect.Modifier;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    30
import java.lang.reflect.Type;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    31
import java.util.ArrayList;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    32
import java.util.Collections;
39008
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    33
import java.util.Comparator;
25566
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    34
import java.util.List;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    35
52840
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
    36
import com.sun.beans.TypeResolver;
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
    37
import com.sun.beans.finder.MethodFinder;
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
    38
25566
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    39
final class MethodInfo {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    40
    final Method method;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    41
    final Class<?> type;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    42
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    43
    MethodInfo(Method method, Class<?> type) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    44
        this.method = method;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    45
        this.type = type;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    46
    }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    47
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    48
    MethodInfo(Method method, Type type) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    49
        this.method = method;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    50
        this.type = resolve(method, type);
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    51
    }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    52
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    53
    boolean isThrow(Class<?> exception) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    54
        for (Class<?> type : this.method.getExceptionTypes()) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    55
            if (type == exception) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    56
                return true;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    57
            }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    58
        }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    59
        return false;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    60
    }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    61
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    62
    static Class<?> resolve(Method method, Type type) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    63
        return TypeResolver.erase(TypeResolver.resolveInClass(method.getDeclaringClass(), type));
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    64
    }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    65
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    66
    static List<Method> get(Class<?> type) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    67
        List<Method> list = null;
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    68
        if (type != null) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    69
            boolean inaccessible = !Modifier.isPublic(type.getModifiers());
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    70
            for (Method method : type.getMethods()) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    71
                if (method.getDeclaringClass().equals(type)) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    72
                    if (inaccessible) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    73
                        try {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    74
                            method = MethodFinder.findAccessibleMethod(method);
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    75
                            if (!method.getDeclaringClass().isInterface()) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    76
                                method = null; // ignore methods from superclasses
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    77
                            }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    78
                        } catch (NoSuchMethodException exception) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    79
                            // commented out because of 6976577
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    80
                            // method = null; // ignore inaccessible methods
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    81
                        }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    82
                    }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    83
                    if (method != null) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    84
                        if (list == null) {
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    85
                            list = new ArrayList<>();
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    86
                        }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    87
                        list.add(method);
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    88
                    }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    89
                }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    90
            }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
    91
        }
39008
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    92
        if (list != null) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    93
            list.sort(MethodOrder.instance);
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    94
            return Collections.unmodifiableList(list);
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    95
        }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    96
        return Collections.emptyList();
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    97
    }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    98
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
    99
    /**
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   100
     * A comparator that defines a total order so that methods have the same
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   101
     * name and identical signatures appear next to each others. The methods are
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   102
     * sorted in such a way that methods which override each other will sit next
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   103
     * to each other, with the overridden method last - e.g. is Integer getFoo()
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   104
     * placed before Object getFoo().
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   105
     **/
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   106
    private static final class MethodOrder implements Comparator<Method> {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   107
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   108
        /*
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   109
         * Code particularly was copied from com.sun.jmx.mbeanserver.MethodOrder
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   110
         */
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   111
        @Override
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   112
        public int compare(final Method a, final Method b) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   113
            int cmp = a.getName().compareTo(b.getName());
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   114
            if (cmp != 0) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   115
                return cmp;
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   116
            }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   117
            final Class<?>[] aparams = a.getParameterTypes();
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   118
            final Class<?>[] bparams = b.getParameterTypes();
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   119
            if (aparams.length != bparams.length) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   120
                return aparams.length - bparams.length;
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   121
            }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   122
            for (int i = 0; i < aparams.length; ++i) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   123
                final Class<?> aparam = aparams[i];
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   124
                final Class<?> bparam = bparams[i];
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   125
                if (aparam == bparam) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   126
                    continue;
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   127
                }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   128
                cmp = aparam.getName().compareTo(bparam.getName());
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   129
                if (cmp != 0) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   130
                    return cmp;
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   131
                }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   132
            }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   133
            final Class<?> aret = a.getReturnType();
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   134
            final Class<?> bret = b.getReturnType();
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   135
            if (aret == bret) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   136
                return 0;
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   137
            }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   138
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   139
            // Super type comes last: Integer, Number, Object
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   140
            if (aret.isAssignableFrom(bret)) {
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   141
                return 1;
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   142
            }
52840
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
   143
            if (bret.isAssignableFrom(aret)) {
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
   144
                return -1;
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
   145
            }
7644f534b60a 8211147: Incorrect comparator com.sun.beans.introspect.MethodInfo.MethodOrder
serb
parents: 47216
diff changeset
   146
            return aret.getName().compareTo(bret.getName());
39008
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   147
        }
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   148
8992e2fc49aa 8156043: Unstable behavior of PropertyDescriptor's getWriteMethod() in case of overloaded setters
serb
parents: 25859
diff changeset
   149
        static final MethodOrder instance = new MethodOrder();
25566
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
   150
    }
ba387c302edd 4058433: RFE: tool for creating BeanInfo template
malenkov
parents:
diff changeset
   151
}