equal
deleted
inserted
replaced
642 } |
642 } |
643 |
643 |
644 /** |
644 /** |
645 * Returns the list of "getter" methods for the given class. The list |
645 * Returns the list of "getter" methods for the given class. The list |
646 * is ordered so that isXXX methods appear before getXXX methods - this |
646 * is ordered so that isXXX methods appear before getXXX methods - this |
647 * is for compatability with the JavaBeans Introspector. |
647 * is for compatibility with the JavaBeans Introspector. |
648 */ |
648 */ |
649 static List<Method> getReadMethods(Class<?> clazz) { |
649 static List<Method> getReadMethods(Class<?> clazz) { |
650 // return cached result if available |
650 // return cached result if available |
651 List<Method> cachedResult = getCachedMethods(clazz); |
651 List<Method> cachedResult = getCachedMethods(clazz); |
652 if (cachedResult != null) |
652 if (cachedResult != null) |
680 /** |
680 /** |
681 * Returns the "getter" to read the given property from the given class or |
681 * Returns the "getter" to read the given property from the given class or |
682 * {@code null} if no method is found. |
682 * {@code null} if no method is found. |
683 */ |
683 */ |
684 static Method getReadMethod(Class<?> clazz, String property) { |
684 static Method getReadMethod(Class<?> clazz, String property) { |
685 // first character in uppercase (compatability with JavaBeans) |
685 // first character in uppercase (compatibility with JavaBeans) |
686 property = property.substring(0, 1).toUpperCase(Locale.ENGLISH) + |
686 property = property.substring(0, 1).toUpperCase(Locale.ENGLISH) + |
687 property.substring(1); |
687 property.substring(1); |
688 String getMethod = GET_METHOD_PREFIX + property; |
688 String getMethod = GET_METHOD_PREFIX + property; |
689 String isMethod = IS_METHOD_PREFIX + property; |
689 String isMethod = IS_METHOD_PREFIX + property; |
690 for (Method m: getReadMethods(clazz)) { |
690 for (Method m: getReadMethods(clazz)) { |