com.sun.tools.classfile.TypeAnnotation.Position.TypePathEntry Java Examples
The following examples show how to use
com.sun.tools.classfile.TypeAnnotation.Position.TypePathEntry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TypeAnnotation.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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); } }
Example #2
Source File: TypeAnnotation.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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); } }
Example #3
Source File: TypeAnnotation.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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); } }
Example #4
Source File: TypeAnnotation.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
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); } }
Example #5
Source File: TypeAnnotation.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
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); } }
Example #6
Source File: TypeAnnotation.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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); } }
Example #7
Source File: TypeAnnotation.java From hottub with GNU General Public License v2.0 | 6 votes |
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); } }
Example #8
Source File: TypeAnnotation.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
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); } }
Example #9
Source File: TypeAnnotation.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example #10
Source File: TypeAnnotation.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public TypePathEntry(TypePathEntryKind tag, int arg) { if (tag != TypePathEntryKind.TYPE_ARGUMENT) { throw new AssertionError("Invalid TypePathEntryKind: " + tag); } this.tag = tag; this.arg = arg; }
Example #11
Source File: TypeAnnotation.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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; }
Example #12
Source File: TypeAnnotation.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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; }
Example #13
Source File: TypeAnnotation.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
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; }
Example #14
Source File: TypeAnnotation.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example #15
Source File: TypeAnnotation.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@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; }
Example #16
Source File: TypeAnnotation.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public TypePathEntry(TypePathEntryKind tag, int arg) { if (tag != TypePathEntryKind.TYPE_ARGUMENT) { throw new AssertionError("Invalid TypePathEntryKind: " + tag); } this.tag = tag; this.arg = arg; }
Example #17
Source File: TypeAnnotation.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@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; }
Example #18
Source File: TypeAnnotation.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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; }
Example #19
Source File: TypeAnnotation.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@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; }
Example #20
Source File: TypeAnnotation.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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; }
Example #21
Source File: TypeAnnotation.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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; }
Example #22
Source File: TypeAnnotation.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example #23
Source File: TypeAnnotation.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@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; }
Example #24
Source File: TypeAnnotation.java From hottub with GNU General Public License v2.0 | 5 votes |
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; }
Example #25
Source File: TypeAnnotation.java From hottub with GNU General Public License v2.0 | 5 votes |
public TypePathEntry(TypePathEntryKind tag, int arg) { if (tag != TypePathEntryKind.TYPE_ARGUMENT) { throw new AssertionError("Invalid TypePathEntryKind: " + tag); } this.tag = tag; this.arg = arg; }
Example #26
Source File: TypeAnnotation.java From hottub with GNU General Public License v2.0 | 5 votes |
@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; }
Example #27
Source File: TypeAnnotation.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example #28
Source File: TypeAnnotation.java From hottub with GNU General Public License v2.0 | 5 votes |
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; }
Example #29
Source File: TypeAnnotation.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public TypePathEntry(TypePathEntryKind tag, int arg) { if (tag != TypePathEntryKind.TYPE_ARGUMENT) { throw new AssertionError("Invalid TypePathEntryKind: " + tag); } this.tag = tag; this.arg = arg; }
Example #30
Source File: TypeAnnotation.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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; }