ExtendedBeanInfo.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:lams 作者:
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());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号