use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IndexedPropertyDescriptorTest method testIndexedPropertyDescriptorStringClassStringStringStringString_RNull.
/**
* index read /read null
*/
public void testIndexedPropertyDescriptorStringClassStringStringStringString_RNull() throws IntrospectionException {
String propertyName = "PropertyFour";
Class<MockJavaBean> beanClass = MockJavaBean.class;
IndexedPropertyDescriptor ipd = new IndexedPropertyDescriptor(propertyName, beanClass, null, "set" + propertyName, null, "set" + propertyName);
assertEquals(String.class, ipd.getIndexedPropertyType());
assertEquals(String[].class, ipd.getPropertyType());
assertNotNull(ipd.getWriteMethod());
assertNotNull(ipd.getIndexedWriteMethod());
}
use of java.beans.IndexedPropertyDescriptor in project j2objc by google.
the class IntrospectorTest method test_MixedSimpleClass19.
public void test_MixedSimpleClass19() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedSimpleClass19.class);
Method getter = MixedSimpleClass19.class.getDeclaredMethod("getList", int.class);
Method setter = MixedSimpleClass19.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_MixedBooleanExtendClass7.
public void test_MixedBooleanExtendClass7() throws Exception {
BeanInfo info = Introspector.getBeanInfo(MixedBooleanExtendClass7.class);
Method setter = MixedBooleanSimpleClass25.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_MixedSimpleClass56.
public void test_MixedSimpleClass56() throws Exception {
BeanInfo beanInfo = Introspector.getBeanInfo(MixedSimpleClass56.class);
Method getter = MixedSimpleClass56.class.getMethod("getList", new Class<?>[] { int.class });
Method setter = MixedSimpleClass56.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);
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_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());
}
}
}
Aggregations