OptionalIdentifiedDefinition.java 文件源码

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

项目:Camel 作者:
/**
 * Returns a short name for this node which can be useful for ID generation or referring to related resources like images
 *
 * @return defaults to "node" but derived nodes should overload this to provide a unique name
 */
@Override
public String getShortName() {
    if (shortName == null) {
        XmlRootElement root = getClass().getAnnotation(XmlRootElement.class);
        if (root != null) {
            shortName = root.name();
        }
        if (shortName == null) {
            XmlType type = getClass().getAnnotation(XmlType.class);
            if (type != null) {
                shortName = type.name();
            }
        }
    }
    return shortName;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号