JAXBContextInitializer.java 文件源码

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

项目:cxf-plus 作者:
/**
 * Checks if the field is accepted as a JAXB property.
 */
static boolean isFieldAccepted(Field field, XmlAccessType accessType) {
    // We only accept non static fields which are not marked @XmlTransient
    if (Modifier.isStatic(field.getModifiers()) || field.isAnnotationPresent(XmlTransient.class)) {
        return false;
    }
    if (accessType == XmlAccessType.PUBLIC_MEMBER 
        && !Modifier.isPublic(field.getModifiers())) {
        return false;
    }
    if (field.getAnnotation(XmlJavaTypeAdapter.class) != null) {
        return false;
    }
    if (accessType == XmlAccessType.NONE
        || accessType == XmlAccessType.PROPERTY) {
        return checkJaxbAnnotation(field.getAnnotations());
    } else {
        return true;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号