use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanExtendClass2.
public void test_MixedBooleanExtendClass2() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanExtendClass2.class);
Method setter = MixedBooleanExtendClass2.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());
assertNull(((IndexedPropertyDescriptor) pd).getIndexedReadMethod());
assertEquals(setter, ((IndexedPropertyDescriptor) pd).getIndexedWriteMethod());
break;
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass49.
public void test_MixedSimpleClass49() throws Exception {
BeanInfo beanInfo = Introspector.getBeanInfo(MixedSimpleClass49.class);
Method setter = MixedSimpleClass49.class.getMethod("setList", new Class<?>[] { boolean.class });
assertEquals(2, beanInfo.getPropertyDescriptors().length);
for (PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertNull(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_MixedExtendClass10.
public void test_MixedExtendClass10() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedExtendClass10.class);
Method setter = MixedExtendClass10.class.getDeclaredMethod("setList", int.class, Object.class);
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertTrue(pd instanceof IndexedPropertyDescriptor);
assertNull(pd.getReadMethod());
assertNull(pd.getWriteMethod());
assertNull(((IndexedPropertyDescriptor) pd).getIndexedReadMethod());
assertEquals(setter, ((IndexedPropertyDescriptor) pd).getIndexedWriteMethod());
break;
}
}
}
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_MixedSimpleClass52.
public void test_MixedSimpleClass52() throws Exception {
BeanInfo beanInfo = Introspector.getBeanInfo(MixedSimpleClass52.class);
Method setter = MixedSimpleClass52.class.getMethod("setList", new Class<?>[] { int.class, boolean.class });
assertEquals(2, beanInfo.getPropertyDescriptors().length);
for (PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertNull(pd.getReadMethod());
assertNull(pd.getWriteMethod());
assertTrue(pd instanceof IndexedPropertyDescriptor);
assertNull(((IndexedPropertyDescriptor) pd).getIndexedReadMethod());
assertEquals(setter, ((IndexedPropertyDescriptor) pd).getIndexedWriteMethod());
}
}
}
Aggregations