use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass26.
public void test_MixedSimpleClass26() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedSimpleClass26.class);
Method normalGetter = MixedSimpleClass26.class.getDeclaredMethod("getList");
Method indexedGetter = MixedSimpleClass26.class.getDeclaredMethod("getList", int.class);
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertTrue(pd instanceof IndexedPropertyDescriptor);
assertEquals(normalGetter, pd.getReadMethod());
assertNull(pd.getWriteMethod());
assertEquals(indexedGetter, ((IndexedPropertyDescriptor) pd).getIndexedReadMethod());
assertNull(((IndexedPropertyDescriptor) pd).getIndexedWriteMethod());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass5.
public void test_MixedSimpleClass5() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedSimpleClass5.class);
Method getter = MixedSimpleClass5.class.getDeclaredMethod("getList");
Method setter = MixedSimpleClass5.class.getDeclaredMethod("setList", Object.class);
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertFalse(pd instanceof IndexedPropertyDescriptor);
assertEquals(getter, pd.getReadMethod());
assertEquals(setter, pd.getWriteMethod());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanSimpleClass14.
public void test_MixedBooleanSimpleClass14() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass14.class);
Method getter = MixedBooleanSimpleClass14.class.getDeclaredMethod("getList");
Method setter = MixedBooleanSimpleClass14.class.getDeclaredMethod("setList", boolean.class);
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertFalse(pd instanceof IndexedPropertyDescriptor);
assertEquals(getter, pd.getReadMethod());
assertEquals(setter, pd.getWriteMethod());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass46.
public void test_MixedSimpleClass46() throws Exception {
BeanInfo beanInfo = Introspector.getBeanInfo(MixedSimpleClass46.class);
Method getter = MixedSimpleClass46.class.getMethod("getList", new Class<?>[] {});
assertEquals(2, beanInfo.getPropertyDescriptors().length);
for (PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertEquals(getter, pd.getReadMethod());
assertNull(pd.getWriteMethod());
assertFalse(pd instanceof IndexedPropertyDescriptor);
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass27.
public void test_MixedSimpleClass27() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedSimpleClass27.class);
Method indexedGetter = MixedSimpleClass27.class.getDeclaredMethod("getList", int.class);
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertTrue(pd instanceof IndexedPropertyDescriptor);
assertNull(pd.getReadMethod());
assertNull(pd.getWriteMethod());
assertEquals(indexedGetter, ((IndexedPropertyDescriptor) pd).getIndexedReadMethod());
assertNull(((IndexedPropertyDescriptor) pd).getIndexedWriteMethod());
}
}
}
Aggregations