jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java
changeset 5947 0e6f2837eeca
parent 5506 202f599c92aa
child 11088 86d4baf04e15
equal deleted inserted replaced
5769:2a390122edff 5947:0e6f2837eeca
     1 /*
     1 /*
     2  * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   116      * @param method  object that represents found method
   116      * @param method  object that represents found method
   117      * @return object that represents accessible method
   117      * @return object that represents accessible method
   118      * @throws NoSuchMethodException if method is not accessible or is not found
   118      * @throws NoSuchMethodException if method is not accessible or is not found
   119      *                               in specified superclass or interface
   119      *                               in specified superclass or interface
   120      */
   120      */
   121     private static Method findAccessibleMethod(Method method) throws NoSuchMethodException {
   121     public static Method findAccessibleMethod(Method method) throws NoSuchMethodException {
   122         Class<?> type = method.getDeclaringClass();
   122         Class<?> type = method.getDeclaringClass();
   123         if (Modifier.isPublic(type.getModifiers())) {
   123         if (Modifier.isPublic(type.getModifiers())) {
   124             return method;
   124             return method;
   125         }
   125         }
   126         if (Modifier.isStatic(method.getModifiers())) {
   126         if (Modifier.isStatic(method.getModifiers())) {