Method setter(String propertyName, Class type) { Method s = null; try { s = proxyObject.getClass().getMethod("set" + propertyName, type); } catch (NoSuchMethodException e) { s = cp().setter(propertyName, type); } return s; }
Method getter(String propertyName) { Method g = null; try { g = proxyObject.getClass().getMethod("get" + propertyName, null); } catch (NoSuchMethodException e1) { // could be boolean try { g = proxyObject.getClass().getMethod("is" + propertyName, null); } catch (NoSuchMethodException e2) { } } if (g == null) { g = cp().getter(propertyName, null); } return g; }