TypeAnnotation.java 文件源码

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

项目:openjdk-jdk10 作者:
public static LocationInfo parseLocationInfo(ByteBuffer buf) {
    int depth = buf.get() & 0xFF;
    if (depth == 0)
        return BASE_LOCATION;
    Location[] locations = new Location[depth];
    for (int i = 0; i < depth; i++) {
        byte tag = buf.get();
        short index = (short)(buf.get() & 0xFF);
        if (!(tag == 0 || tag == 1 | tag == 2 || tag == 3))
            throw new AnnotationFormatError("Bad Location encoding in Type Annotation");
        if (tag != 3 && index != 0)
            throw new AnnotationFormatError("Bad Location encoding in Type Annotation");
        locations[i] = new Location(tag, index);
    }
    return new LocationInfo(depth, locations);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号