NumberFormat.java 文件源码

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

项目:OpenJSharp 作者:
/**
 * Resolves instances being deserialized to the predefined constants.
 *
 * @throws InvalidObjectException if the constant could not be resolved.
 * @return resolved NumberFormat.Field constant
 */
@Override
protected Object readResolve() throws InvalidObjectException {
    if (this.getClass() != NumberFormat.Field.class) {
        throw new InvalidObjectException("subclass didn't correctly implement readResolve");
    }

    Object instance = instanceMap.get(getName());
    if (instance != null) {
        return instance;
    } else {
        throw new InvalidObjectException("unknown attribute name");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号