Method name = IntrospectionSupport.getPropertyGetter(ExampleBean.class, "name");
assertEquals("getName", name.getName());
}
public void testIsGetter() throws Exception {
ExampleBean bean = new ExampleBean();
Method name = bean.getClass().getMethod("getName", (Class<?>[])null);
assertEquals(true, IntrospectionSupport.isGetter(name));
assertEquals(false, IntrospectionSupport.isSetter(name));
Method price = bean.getClass().getMethod("getPrice", (Class<?>[])null);
assertEquals(true, IntrospectionSupport.isGetter(price));
assertEquals(false, IntrospectionSupport.isSetter(price));
}