public SimplePropertyDescriptor(String propertyName, Method readMethod, Method writeMethod) throws IntrospectionException { super(propertyName, null, null); this.readMethod = readMethod; this.writeMethod = writeMethod; this.propertyType = PropertyDescriptorUtils.findPropertyType(readMethod, writeMethod); }
@Override public Class<?> getPropertyType() { if (this.propertyType == null) { try { this.propertyType = PropertyDescriptorUtils.findPropertyType(this.readMethod, this.writeMethod); } catch (IntrospectionException ex) { // Ignore, as does IndexedPropertyDescriptor#getPropertyType } } return this.propertyType; }