MessageFormat.java 文件源码

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

项目:fitnotifications 作者:
/**
 * Resolves instances being deserialized to the predefined constants.
 *
 * @return resolved MessageFormat.Field constant
 * @throws InvalidObjectException if the constant could not be resolved.
 *
 * @stable ICU 3.8
 */
@Override
protected Object readResolve() throws InvalidObjectException {
    if (this.getClass() != MessageFormat.Field.class) {
        throw new InvalidObjectException(
            "A subclass of MessageFormat.Field must implement readResolve.");
    }
    if (this.getName().equals(ARGUMENT.getName())) {
        return ARGUMENT;
    } else {
        throw new InvalidObjectException("Unknown attribute name.");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号