Java 类com.sun.tools.classfile.TypeAnnotation.Position.TypePathEntry 实例源码

项目:OpenJSharp    文件:TypeAnnotation.java   
public static TypePathEntry fromBinary(int tag, int arg) {
    if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) {
        throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
    }
    switch (tag) {
    case 0:
        return ARRAY;
    case 1:
        return INNER_TYPE;
    case 2:
        return WILDCARD;
    case 3:
        return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg);
    default:
        throw new AssertionError("Invalid TypePathEntryKind tag: " + tag);
    }
}
项目:openjdk-jdk10    文件:TypeAnnotation.java   
public static TypePathEntry fromBinary(int tag, int arg) {
    if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) {
        throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
    }
    switch (tag) {
    case 0:
        return ARRAY;
    case 1:
        return INNER_TYPE;
    case 2:
        return WILDCARD;
    case 3:
        return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg);
    default:
        throw new AssertionError("Invalid TypePathEntryKind tag: " + tag);
    }
}
项目:openjdk9    文件:TypeAnnotation.java   
public static TypePathEntry fromBinary(int tag, int arg) {
    if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) {
        throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
    }
    switch (tag) {
    case 0:
        return ARRAY;
    case 1:
        return INNER_TYPE;
    case 2:
        return WILDCARD;
    case 3:
        return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg);
    default:
        throw new AssertionError("Invalid TypePathEntryKind tag: " + tag);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeAnnotation.java   
public static TypePathEntry fromBinary(int tag, int arg) {
    if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) {
        throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
    }
    switch (tag) {
    case 0:
        return ARRAY;
    case 1:
        return INNER_TYPE;
    case 2:
        return WILDCARD;
    case 3:
        return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg);
    default:
        throw new AssertionError("Invalid TypePathEntryKind tag: " + tag);
    }
}
项目:jsr308-langtools    文件:TypeAnnotation.java   
public static TypePathEntry fromBinary(int tag, int arg) {
    if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) {
        throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
    }
    switch (tag) {
    case 0:
        return ARRAY;
    case 1:
        return INNER_TYPE;
    case 2:
        return WILDCARD;
    case 3:
        return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg);
    default:
        throw new AssertionError("Invalid TypePathEntryKind tag: " + tag);
    }
}
项目:infobip-open-jdk-8    文件:TypeAnnotation.java   
public static TypePathEntry fromBinary(int tag, int arg) {
    if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) {
        throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
    }
    switch (tag) {
    case 0:
        return ARRAY;
    case 1:
        return INNER_TYPE;
    case 2:
        return WILDCARD;
    case 3:
        return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg);
    default:
        throw new AssertionError("Invalid TypePathEntryKind tag: " + tag);
    }
}
项目:OLD-OpenJDK8    文件:TypeAnnotation.java   
public static TypePathEntry fromBinary(int tag, int arg) {
    if (arg != 0 && tag != TypePathEntryKind.TYPE_ARGUMENT.tag) {
        throw new AssertionError("Invalid TypePathEntry tag/arg: " + tag + "/" + arg);
    }
    switch (tag) {
    case 0:
        return ARRAY;
    case 1:
        return INNER_TYPE;
    case 2:
        return WILDCARD;
    case 3:
        return new TypePathEntry(TypePathEntryKind.TYPE_ARGUMENT, arg);
    default:
        throw new AssertionError("Invalid TypePathEntryKind tag: " + tag);
    }
}
项目:OpenJSharp    文件:TypeAnnotation.java   
private TypePathEntry(TypePathEntryKind tag) {
    if (!(tag == TypePathEntryKind.ARRAY ||
            tag == TypePathEntryKind.INNER_TYPE ||
            tag == TypePathEntryKind.WILDCARD)) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = 0;
}
项目:OpenJSharp    文件:TypeAnnotation.java   
public TypePathEntry(TypePathEntryKind tag, int arg) {
    if (tag != TypePathEntryKind.TYPE_ARGUMENT) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = arg;
}
项目:OpenJSharp    文件:TypeAnnotation.java   
@Override
public boolean equals(Object other) {
    if (! (other instanceof TypePathEntry)) {
        return false;
    }
    TypePathEntry tpe = (TypePathEntry) other;
    return this.tag == tpe.tag && this.arg == tpe.arg;
}
项目:OpenJSharp    文件:TypeAnnotation.java   
/**
 * Decode the binary representation for a type path and set
 * the {@code location} field.
 *
 * @param list The bytecode representation of the type path.
 */
public static List<TypePathEntry> getTypePathFromBinary(List<Integer> list) {
    List<TypePathEntry> loc = new ArrayList<TypePathEntry>(list.size() / TypePathEntry.bytesPerEntry);
    int idx = 0;
    while (idx < list.size()) {
        if (idx + 1 == list.size()) {
            throw new AssertionError("Could not decode type path: " + list);
        }
        loc.add(TypePathEntry.fromBinary(list.get(idx), list.get(idx + 1)));
        idx += 2;
    }
    return loc;
}
项目:OpenJSharp    文件:TypeAnnotation.java   
public static List<Integer> getBinaryFromTypePath(List<TypePathEntry> locs) {
    List<Integer> loc = new ArrayList<Integer>(locs.size() * TypePathEntry.bytesPerEntry);
    for (TypePathEntry tpe : locs) {
        loc.add(tpe.tag.tag);
        loc.add(tpe.arg);
    }
    return loc;
}
项目:openjdk-jdk10    文件:TypeAnnotation.java   
private TypePathEntry(TypePathEntryKind tag) {
    if (!(tag == TypePathEntryKind.ARRAY ||
            tag == TypePathEntryKind.INNER_TYPE ||
            tag == TypePathEntryKind.WILDCARD)) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = 0;
}
项目:openjdk-jdk10    文件:TypeAnnotation.java   
public TypePathEntry(TypePathEntryKind tag, int arg) {
    if (tag != TypePathEntryKind.TYPE_ARGUMENT) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = arg;
}
项目:openjdk-jdk10    文件:TypeAnnotation.java   
@Override
public boolean equals(Object other) {
    if (! (other instanceof TypePathEntry)) {
        return false;
    }
    TypePathEntry tpe = (TypePathEntry) other;
    return this.tag == tpe.tag && this.arg == tpe.arg;
}
项目:openjdk-jdk10    文件:TypeAnnotation.java   
/**
 * Decode the binary representation for a type path and set
 * the {@code location} field.
 *
 * @param list The bytecode representation of the type path.
 */
public static List<TypePathEntry> getTypePathFromBinary(List<Integer> list) {
    List<TypePathEntry> loc = new ArrayList<>(list.size() / TypePathEntry.bytesPerEntry);
    int idx = 0;
    while (idx < list.size()) {
        if (idx + 1 == list.size()) {
            throw new AssertionError("Could not decode type path: " + list);
        }
        loc.add(TypePathEntry.fromBinary(list.get(idx), list.get(idx + 1)));
        idx += 2;
    }
    return loc;
}
项目:openjdk-jdk10    文件:TypeAnnotation.java   
public static List<Integer> getBinaryFromTypePath(List<TypePathEntry> locs) {
    List<Integer> loc = new ArrayList<>(locs.size() * TypePathEntry.bytesPerEntry);
    for (TypePathEntry tpe : locs) {
        loc.add(tpe.tag.tag);
        loc.add(tpe.arg);
    }
    return loc;
}
项目:openjdk9    文件:TypeAnnotation.java   
private TypePathEntry(TypePathEntryKind tag) {
    if (!(tag == TypePathEntryKind.ARRAY ||
            tag == TypePathEntryKind.INNER_TYPE ||
            tag == TypePathEntryKind.WILDCARD)) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = 0;
}
项目:openjdk9    文件:TypeAnnotation.java   
public TypePathEntry(TypePathEntryKind tag, int arg) {
    if (tag != TypePathEntryKind.TYPE_ARGUMENT) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = arg;
}
项目:openjdk9    文件:TypeAnnotation.java   
@Override
public boolean equals(Object other) {
    if (! (other instanceof TypePathEntry)) {
        return false;
    }
    TypePathEntry tpe = (TypePathEntry) other;
    return this.tag == tpe.tag && this.arg == tpe.arg;
}
项目:openjdk9    文件:TypeAnnotation.java   
/**
 * Decode the binary representation for a type path and set
 * the {@code location} field.
 *
 * @param list The bytecode representation of the type path.
 */
public static List<TypePathEntry> getTypePathFromBinary(List<Integer> list) {
    List<TypePathEntry> loc = new ArrayList<>(list.size() / TypePathEntry.bytesPerEntry);
    int idx = 0;
    while (idx < list.size()) {
        if (idx + 1 == list.size()) {
            throw new AssertionError("Could not decode type path: " + list);
        }
        loc.add(TypePathEntry.fromBinary(list.get(idx), list.get(idx + 1)));
        idx += 2;
    }
    return loc;
}
项目:openjdk9    文件:TypeAnnotation.java   
public static List<Integer> getBinaryFromTypePath(List<TypePathEntry> locs) {
    List<Integer> loc = new ArrayList<>(locs.size() * TypePathEntry.bytesPerEntry);
    for (TypePathEntry tpe : locs) {
        loc.add(tpe.tag.tag);
        loc.add(tpe.arg);
    }
    return loc;
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeAnnotation.java   
private TypePathEntry(TypePathEntryKind tag) {
    if (!(tag == TypePathEntryKind.ARRAY ||
            tag == TypePathEntryKind.INNER_TYPE ||
            tag == TypePathEntryKind.WILDCARD)) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = 0;
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeAnnotation.java   
public TypePathEntry(TypePathEntryKind tag, int arg) {
    if (tag != TypePathEntryKind.TYPE_ARGUMENT) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = arg;
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeAnnotation.java   
@Override
public boolean equals(Object other) {
    if (! (other instanceof TypePathEntry)) {
        return false;
    }
    TypePathEntry tpe = (TypePathEntry) other;
    return this.tag == tpe.tag && this.arg == tpe.arg;
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeAnnotation.java   
/**
 * Decode the binary representation for a type path and set
 * the {@code location} field.
 *
 * @param list The bytecode representation of the type path.
 */
public static List<TypePathEntry> getTypePathFromBinary(List<Integer> list) {
    List<TypePathEntry> loc = new ArrayList<TypePathEntry>(list.size() / TypePathEntry.bytesPerEntry);
    int idx = 0;
    while (idx < list.size()) {
        if (idx + 1 == list.size()) {
            throw new AssertionError("Could not decode type path: " + list);
        }
        loc.add(TypePathEntry.fromBinary(list.get(idx), list.get(idx + 1)));
        idx += 2;
    }
    return loc;
}
项目:lookaside_java-1.8.0-openjdk    文件:TypeAnnotation.java   
public static List<Integer> getBinaryFromTypePath(List<TypePathEntry> locs) {
    List<Integer> loc = new ArrayList<Integer>(locs.size() * TypePathEntry.bytesPerEntry);
    for (TypePathEntry tpe : locs) {
        loc.add(tpe.tag.tag);
        loc.add(tpe.arg);
    }
    return loc;
}
项目:jsr308-langtools    文件:TypeAnnotation.java   
private TypePathEntry(TypePathEntryKind tag) {
    if (!(tag == TypePathEntryKind.ARRAY ||
            tag == TypePathEntryKind.INNER_TYPE ||
            tag == TypePathEntryKind.WILDCARD)) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = 0;
}
项目:jsr308-langtools    文件:TypeAnnotation.java   
public TypePathEntry(TypePathEntryKind tag, int arg) {
    if (tag != TypePathEntryKind.TYPE_ARGUMENT) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = arg;
}
项目:jsr308-langtools    文件:TypeAnnotation.java   
@Override
public boolean equals(Object other) {
    if (! (other instanceof TypePathEntry)) {
        return false;
    }
    TypePathEntry tpe = (TypePathEntry) other;
    return this.tag == tpe.tag && this.arg == tpe.arg;
}
项目:jsr308-langtools    文件:TypeAnnotation.java   
/**
 * Decode the binary representation for a type path and set
 * the {@code location} field.
 *
 * @param list The bytecode representation of the type path.
 */
public static List<TypePathEntry> getTypePathFromBinary(List<Integer> list) {
    List<TypePathEntry> loc = new ArrayList<TypePathEntry>(list.size() / TypePathEntry.bytesPerEntry);
    int idx = 0;
    while (idx < list.size()) {
        if (idx + 1 == list.size()) {
            throw new AssertionError("Could not decode type path: " + list);
        }
        loc.add(TypePathEntry.fromBinary(list.get(idx), list.get(idx + 1)));
        idx += 2;
    }
    return loc;
}
项目:jsr308-langtools    文件:TypeAnnotation.java   
public static List<Integer> getBinaryFromTypePath(List<TypePathEntry> locs) {
    List<Integer> loc = new ArrayList<Integer>(locs.size() * TypePathEntry.bytesPerEntry);
    for (TypePathEntry tpe : locs) {
        loc.add(tpe.tag.tag);
        loc.add(tpe.arg);
    }
    return loc;
}
项目:infobip-open-jdk-8    文件:TypeAnnotation.java   
private TypePathEntry(TypePathEntryKind tag) {
    if (!(tag == TypePathEntryKind.ARRAY ||
            tag == TypePathEntryKind.INNER_TYPE ||
            tag == TypePathEntryKind.WILDCARD)) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = 0;
}
项目:infobip-open-jdk-8    文件:TypeAnnotation.java   
public TypePathEntry(TypePathEntryKind tag, int arg) {
    if (tag != TypePathEntryKind.TYPE_ARGUMENT) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = arg;
}
项目:infobip-open-jdk-8    文件:TypeAnnotation.java   
@Override
public boolean equals(Object other) {
    if (! (other instanceof TypePathEntry)) {
        return false;
    }
    TypePathEntry tpe = (TypePathEntry) other;
    return this.tag == tpe.tag && this.arg == tpe.arg;
}
项目:infobip-open-jdk-8    文件:TypeAnnotation.java   
/**
 * Decode the binary representation for a type path and set
 * the {@code location} field.
 *
 * @param list The bytecode representation of the type path.
 */
public static List<TypePathEntry> getTypePathFromBinary(List<Integer> list) {
    List<TypePathEntry> loc = new ArrayList<TypePathEntry>(list.size() / TypePathEntry.bytesPerEntry);
    int idx = 0;
    while (idx < list.size()) {
        if (idx + 1 == list.size()) {
            throw new AssertionError("Could not decode type path: " + list);
        }
        loc.add(TypePathEntry.fromBinary(list.get(idx), list.get(idx + 1)));
        idx += 2;
    }
    return loc;
}
项目:infobip-open-jdk-8    文件:TypeAnnotation.java   
public static List<Integer> getBinaryFromTypePath(List<TypePathEntry> locs) {
    List<Integer> loc = new ArrayList<Integer>(locs.size() * TypePathEntry.bytesPerEntry);
    for (TypePathEntry tpe : locs) {
        loc.add(tpe.tag.tag);
        loc.add(tpe.arg);
    }
    return loc;
}
项目:OLD-OpenJDK8    文件:TypeAnnotation.java   
private TypePathEntry(TypePathEntryKind tag) {
    if (!(tag == TypePathEntryKind.ARRAY ||
            tag == TypePathEntryKind.INNER_TYPE ||
            tag == TypePathEntryKind.WILDCARD)) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = 0;
}
项目:OLD-OpenJDK8    文件:TypeAnnotation.java   
public TypePathEntry(TypePathEntryKind tag, int arg) {
    if (tag != TypePathEntryKind.TYPE_ARGUMENT) {
        throw new AssertionError("Invalid TypePathEntryKind: " + tag);
    }
    this.tag = tag;
    this.arg = arg;
}
项目:OLD-OpenJDK8    文件:TypeAnnotation.java   
@Override
public boolean equals(Object other) {
    if (! (other instanceof TypePathEntry)) {
        return false;
    }
    TypePathEntry tpe = (TypePathEntry) other;
    return this.tag == tpe.tag && this.arg == tpe.arg;
}