(Class clas, String propName)
| 693 | |
| 694 | |
| 695 | public static boolean hasObjectPropertyGetter(Class clas, String propName) { |
| 696 | if (clas == Primitive.class) { |
| 697 | return false; |
| 698 | } |
| 699 | String getterName = accessorName("get", propName); |
| 700 | try { |
| 701 | clas.getMethod(getterName, new Class[0]); |
| 702 | return true; |
| 703 | } catch (NoSuchMethodException e) { /* fall through */ } |
| 704 | getterName = accessorName("is", propName); |
| 705 | try { |
| 706 | Method m = clas.getMethod(getterName, new Class[0]); |
| 707 | return (m.getReturnType() == Boolean.TYPE); |
| 708 | } catch (NoSuchMethodException e) { |
| 709 | return false; |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | |
| 714 | public static boolean hasObjectPropertySetter(Class clas, String propName) { |
no test coverage detected