use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanSimpleClass10.
public void test_MixedBooleanSimpleClass10() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass10.class);
Method getter = MixedBooleanSimpleClass10.class.getDeclaredMethod("getList", int.class);
Method setter = MixedBooleanSimpleClass10.class.getDeclaredMethod("setList", int.class, boolean.class);
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertTrue(pd instanceof IndexedPropertyDescriptor);
assertNull(pd.getReadMethod());
assertNull(pd.getWriteMethod());
assertEquals(getter, ((IndexedPropertyDescriptor) pd).getIndexedReadMethod());
assertEquals(setter, ((IndexedPropertyDescriptor) pd).getIndexedWriteMethod());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanSimpleClass17.
public void test_MixedBooleanSimpleClass17() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass17.class);
Method getter = MixedBooleanSimpleClass17.class.getDeclaredMethod("getList");
Method setter = MixedBooleanSimpleClass17.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_MixedBooleanExtendClass14.
public void test_MixedBooleanExtendClass14() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanExtendClass14.class);
Method getter = MixedBooleanSimpleClass43.class.getDeclaredMethod("isList");
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertFalse(pd instanceof IndexedPropertyDescriptor);
assertEquals(getter, pd.getReadMethod());
assertNull(pd.getWriteMethod());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass58.
public void test_MixedSimpleClass58() throws Exception {
BeanInfo beanInfo = Introspector.getBeanInfo(MixedSimpleClass58.class);
Method getter = MixedSimpleClass58.class.getMethod("getList", new Class<?>[] {});
Method setter = MixedSimpleClass58.class.getMethod("setList", new Class<?>[] { boolean.class });
assertEquals(2, beanInfo.getPropertyDescriptors().length);
for (PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertEquals(getter, pd.getReadMethod());
assertEquals(setter, pd.getWriteMethod());
assertFalse(pd instanceof IndexedPropertyDescriptor);
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanSimpleClass2.
public void test_MixedBooleanSimpleClass2() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass2.class);
Method getter = MixedBooleanSimpleClass2.class.getDeclaredMethod("getList");
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertFalse(pd instanceof IndexedPropertyDescriptor);
assertEquals(getter, pd.getReadMethod());
assertNull(pd.getWriteMethod());
}
}
}
Aggregations