use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass14.
public void test_MixedSimpleClass14() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedSimpleClass14.class);
Method getter = MixedSimpleClass14.class.getDeclaredMethod("getList", int.class);
Method setter = MixedSimpleClass14.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());
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_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_MixedBooleanSimpleClass12.
public void test_MixedBooleanSimpleClass12() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass12.class);
Method setter = MixedBooleanSimpleClass12.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());
}
}
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedBooleanSimpleClass30.
public void test_MixedBooleanSimpleClass30() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanSimpleClass30.class);
Method indexedGetter = MixedBooleanSimpleClass30.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());
}
}
}
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