Lines Matching defs:Identifier

57 class Identifier implements Constants {
61 static Hashtable<String, Identifier> hash = new Hashtable<>(3001, 0.5f);
76 * The Type which corresponds to this Identifier. This is used as
90 * @see Identifier.lookup
92 private Identifier(String name) {
116 public static synchronized Identifier lookup(String s) {
118 Identifier id = hash.get(s);
120 hash.put(s, id = new Identifier(s));
128 public static Identifier lookup(Identifier q, Identifier n) {
134 Identifier id = lookup(q + "." + n);
144 public static Identifier lookupInner(Identifier c, Identifier n) {
145 Identifier id;
176 value = (index < 0) ? idNull : Identifier.lookup(name.substring(0, index));
178 return (value instanceof Identifier) && (value != idNull);
186 public Identifier getQualifier() {
187 return isQualified() ? (Identifier)value : idNull;
195 public Identifier getName() {
197 Identifier.lookup(name.substring(((Identifier)value).name.length() + 1)) : this;
209 * operates in terms of Identifier objects. This includes the
214 * be able Identifier type must be able to report the nesting
236 * Identifier id = Identifier.lookup("pkg.Foo. Bar");
241 public Identifier getFlatName() {
248 return Identifier.lookup(name.substring(0,ipos-1));
252 return Identifier.lookup(t+n);
258 public Identifier getTopName() {
260 return Identifier.lookup(getQualifier(), getFlatName().getHead());
268 public Identifier getHead() {
269 Identifier id = this;
278 public Identifier getTail() {
279 Identifier id = getHead();
283 return Identifier.lookup(name.substring(id.name.length() + 1));
304 * Determine whether an Identifier has been marked as ambiguous.
311 * Add ambigPrefix to `this' to make a new Identifier marked as
312 * ambiguous. It is important that this new Identifier not refer
315 public Identifier addAmbigPrefix() {
316 return Identifier.lookup(ambigPrefix + name);
322 public Identifier removeAmbigPrefix() {
324 return Identifier.lookup(name.substring(ambigPrefix.length()));