@Test void propertyDescriptorWithDescriptionAndMandatoryTest() { PropertyDescriptor prop2Descriptor = this.beanDescriptor.getProperty("prop2"); assertNotNull(prop2Descriptor); assertEquals("prop2", prop2Descriptor.getId()); assertEquals("prop2 description", prop2Descriptor.getDescription()); assertSame(int.class, prop2Descriptor.getPropertyClass()); assertTrue(prop2Descriptor.isMandatory()); assertNotNull(prop2Descriptor.getWriteMethod()); assertNotNull(prop2Descriptor.getReadMethod()); assertNull(prop2Descriptor.getField()); }
@Override public PropertyDescriptor getProperty(String propertyName) { return this.parameterDescriptorMap.get(propertyName); }
DefaultBeanDescriptor implements BeanDescriptor { @Override public PropertyDescriptor getProperty(String propertyName) { return this.parameterDescriptorMap.get(propertyName); } }
DefaultBeanDescriptor implements BeanDescriptor { @Override public PropertyDescriptor getProperty(String propertyName) { return this.parameterDescriptorMap.get(propertyName); } DefaultBeanDescriptor(Class<?> beanClass); }
DefaultBeanDescriptor implements BeanDescriptor { @Override public PropertyDescriptor getProperty(String propertyName) { return this.parameterDescriptorMap.get(propertyName); } DefaultBeanDescriptor(Class<?> beanClass); @Override Class<?> getBeanClass(); @Override Collection<PropertyDescriptor> getProperties(); @Override PropertyDescriptor getProperty(String propertyName); }
DefaultBeanDescriptor implements BeanDescriptor { @Override public PropertyDescriptor getProperty(String propertyName) { return this.parameterDescriptorMap.get(propertyName); } DefaultBeanDescriptor(Class<?> beanClass); @Override Class<?> getBeanClass(); @Override Collection<PropertyDescriptor> getProperties(); @Override PropertyDescriptor getProperty(String propertyName);  }