ModelProperty.java 文件源码

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

项目:incubator-netbeans 作者:
private static String findDisplayNameFor(Object o) {
    try {
        if (o == null) {
            return null;
        }

        if (o instanceof Node.Property) {
            return ((Node.Property) o).getDisplayName();
        }

        BeanInfo bi = Introspector.getBeanInfo(o.getClass());

        if (bi != null) {
            BeanDescriptor bd = bi.getBeanDescriptor();

            if (bd != null) {
                return bd.getDisplayName();
            }
        }
    } catch (Exception e) {
        //okay, we did our best
    }

    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号