use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanSimpleClass1.
public void test_MixedBooleanSimpleClass1() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass1.class);
Method getter = MixedBooleanSimpleClass1.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_MixedSimpleClass50.
public void test_MixedSimpleClass50() throws Exception {
BeanInfo beanInfo = Introspector.getBeanInfo(MixedSimpleClass50.class);
Method setter = MixedSimpleClass50.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());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanSimpleClass32.
public void test_MixedBooleanSimpleClass32() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass32.class);
Method getter = MixedBooleanSimpleClass32.class.getDeclaredMethod("getList");
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_MixedExtendClass13.
public void test_MixedExtendClass13() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedExtendClass13.class);
Method setter = MixedExtendClass13.class.getDeclaredMethod("setList", String.class);
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if (propertyName.equals(pd.getName())) {
assertFalse(pd instanceof IndexedPropertyDescriptor);
assertNull(pd.getReadMethod());
assertEquals(setter, pd.getWriteMethod());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass21.
public void test_MixedSimpleClass21() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedSimpleClass21.class);
Method getter = MixedSimpleClass21.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(getter, ((IndexedPropertyDescriptor) pd).getIndexedReadMethod());
assertNull(((IndexedPropertyDescriptor) pd).getIndexedWriteMethod());
}
}
}
Aggregations