ReflectionUtils.java 文件源码

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

项目:motu 作者:
/**
 * Gets the xml schema namespace.
 * 
 * @param clazz the clazz
 * 
 * @return the xml schema namespace
 */
public static String getXmlSchemaNamespace(Class<?> clazz) {

    AnnotatedElement pack = clazz.getPackage();
    if (pack == null) {
        return "";
    }

    XmlSchema schema = pack.getAnnotation(XmlSchema.class);
    String namespace = null;
    if (schema != null) {
        namespace = schema.namespace();
    } else {
        namespace = "";
    }
    return namespace;

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号