/** Return external representation of given name, * converting '/' to '.'. */ public static byte[] externalize(Name name) { return externalize(name.table.names, name.index, name.len); }
/** Return internal representation of given name, * converting '/' to '.'. */ public static byte[] internalize(Name name) { return internalize(name.table.names, name.index, name.len); }
/** Return internal representation of given name, * converting '/' to '.'. */ public static byte[] internalize(Name name) { return internalize(name.table.names, name.index, name.len); }
/** Return external representation of given name, * converting '/' to '.'. */ public static byte[] externalize(Name name) { return externalize(name.table.names, name.index, name.len); }
/** Return internal representation of given name, * converting '/' to '.'. */ public static byte[] internalize(Name name) { return internalize(name.getByteArray(), name.getByteOffset(), name.getByteLength()); }
/** Return external representation of given name, * converting '/' to '.'. */ public static byte[] externalize(Name name) { return externalize(name.getByteArray(), name.getByteOffset(), name.getByteLength()); }
/** Return internal representation of given name, * converting '/' to '.'. */ public static byte[] internalize(Name name) { return internalize(name.getByteArray(), name.getByteOffset(), name.getByteLength()); }
/** Return external representation of given name, * converting '/' to '.'. */ public static byte[] externalize(Name name) { return externalize(name.getByteArray(), name.getByteOffset(), name.getByteLength()); }
/** If name is an array type or class signature, return the * corresponding type; otherwise return a ClassSymbol with given name. */ Object readClassOrType(int i) { int index = poolIdx[i]; int len = getChar(index + 1); int start = index + 3; Assert.check(buf[start] == '[' || buf[start + len - 1] != ';'); // by the above assertion, the following test can be // simplified to (buf[start] == '[') return (buf[start] == '[' || buf[start + len - 1] == ';') ? (Object)sigToType(buf, start, len) : (Object)enterClass(names.fromUtf(internalize(buf, start, len))); }
public void assembleClassSig(Type type) { type = type.unannotatedType(); ClassType ct = (ClassType) type; ClassSymbol c = (ClassSymbol) ct.tsym; classReference(c); Type outer = ct.getEnclosingType(); if (outer.allparams().nonEmpty()) { boolean rawOuter = c.owner.kind == Kinds.MTH || // either a local class c.name == types.names.empty; // or anonymous assembleClassSig(rawOuter ? types.erasure(outer) : outer); append(rawOuter ? '$' : '.'); Assert.check(c.flatname.startsWith(c.owner.enclClass().flatname)); append(rawOuter ? c.flatname.subName(c.owner.enclClass().flatname.getByteLength() + 1, c.flatname.getByteLength()) : c.name); } else { append(externalize(c.flatname)); } if (ct.getTypeArguments().nonEmpty()) { append('<'); assembleSig(ct.getTypeArguments()); append('>'); } }
/** If name is an array type or class signature, return the * corresponding type; otherwise return a ClassSymbol with given name. */ Object readClassOrType(int i) { int index = poolIdx[i]; int len = getChar(index + 1); int start = index + 3; Assert.check(buf[start] == '[' || buf[start + len - 1] != ';'); // by the above assertion, the following test can be // simplified to (buf[start] == '[') return (buf[start] == '[' || buf[start + len - 1] == ';') ? (Object)sigToType(buf, start, len) : (Object)enterClass(names.fromUtf(internalize(buf, start, len))); }
public void assembleClassSig(Type type) { type = type.unannotatedType(); ClassType ct = (ClassType) type; ClassSymbol c = (ClassSymbol) ct.tsym; classReference(c); Type outer = ct.getEnclosingType(); if (outer.allparams().nonEmpty()) { boolean rawOuter = c.owner.kind == Kinds.MTH || // either a local class c.name == types.names.empty; // or anonymous assembleClassSig(rawOuter ? types.erasure(outer) : outer); append('.'); Assert.check(c.flatname.startsWith(c.owner.enclClass().flatname)); append(rawOuter ? c.flatname.subName(c.owner.enclClass().flatname.getByteLength() + 1, c.flatname.getByteLength()) : c.name); } else { append(externalize(c.flatname)); } if (ct.getTypeArguments().nonEmpty()) { append('<'); assembleSig(ct.getTypeArguments()); append('>'); } }