Introspector.java 文件源码

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

项目:Pogamut3 作者:
public static Property getProperty(Field field, Object object) {
    // access also protected and private fields
    field.setAccessible(true);

    // Properties are only primitive types marked by Prop annotation
    if (field.isAnnotationPresent(JProp.class)) {
        // We require that class of the field to be loaded, because we often specify
        // the PropertyEditor there in static block.
        forceInitialization(field.getType());

        //TODO this condition should be used on client when deciding whether to show an editor for it
        if (PropertyEditorManager.findEditor(field.getType()) != null) {
            // add the property
            return new JavaProperty(object, field);
        }
    }
    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号