/*
   * see java.beans.FeatureDescriptor#FeatureDescriptor(FeatureDescriptor)
   */
  public static void copyNonMethodProperties(PropertyDescriptor source, PropertyDescriptor target)
      throws IntrospectionException {

    target.setExpert(source.isExpert());
    target.setHidden(source.isHidden());
    target.setPreferred(source.isPreferred());
    target.setName(source.getName());
    target.setShortDescription(source.getShortDescription());
    target.setDisplayName(source.getDisplayName());

    // copy all attributes (emulating behavior of private FeatureDescriptor#addTable)
    Enumeration<String> keys = source.attributeNames();
    while (keys.hasMoreElements()) {
      String key = keys.nextElement();
      target.setValue(key, source.getValue(key));
    }

    // see java.beans.PropertyDescriptor#PropertyDescriptor(PropertyDescriptor)
    target.setPropertyEditorClass(source.getPropertyEditorClass());
    target.setBound(source.isBound());
    target.setConstrained(source.isConstrained());
  }