/** Return the entry associated with given name, starting in * this scope and proceeding outwards. If no entry was found, * return the sentinel, which is characterized by having a null in * both its scope and sym fields, whereas both fields are non-null * for regular entries. */ public Entry lookup(Name name) { return lookup(name, noFilter); }
/** Look up a synthetic name in a given scope. * @param scope The scope. * @param name The name. */ private Symbol lookupSynthetic(Name name, Scope s) { Symbol sym = s.lookup(name).sym; return (sym==null || (sym.flags()&SYNTHETIC)==0) ? null : sym; }
public Entry lookup(Name name) { Entry e = super.lookup(name); if (e.scope == null) return new Entry(owner, null, null, null); else return e; } }
private boolean useClone() { try { Scope.Entry e = syms.objectType.tsym.members().lookup(names.clone); return (e.sym != null); } catch (CompletionFailure e) { return false; } }
/** Look up a synthetic name in a given scope. * @param scope The scope. * @param name The name. */ private Symbol lookupSynthetic(Name name, Scope s) { Symbol sym = s.lookup(name).sym; return (sym==null || (sym.flags()&SYNTHETIC)==0) ? null : sym; }
private boolean useClone() { try { Scope.Entry e = syms.objectType.tsym.members().lookup(names.clone); return (e.sym != null); } catch (CompletionFailure e) { return false; } }
/** Look up a synthetic name in a given scope. * @param s The scope. * @param name The name. */ private Symbol lookupSynthetic(Name name, Scope s) { Symbol sym = s.lookup(name).sym; return (sym==null || (sym.flags()&SYNTHETIC)==0) ? null : sym; }
public Entry lookup(Name name) { Entry e = super.lookup(name); if (e.scope == null) return new Entry(owner, null, null, null); else return e; } }
/** Given a class, is there already a class with same fully * qualified name in this (import) scope? */ public boolean includes(Symbol c) { for (Scope.Entry e = lookup(c.name); e.scope == this; e = e.next()) { if (e.sym == c) return true; } return false; }
/** Given a class, is there already a class with same fully * qualified name in this (import) scope? */ public boolean includes(Symbol c) { for (Scope.Entry e = lookup(c.name); e.scope == this; e = e.next()) { if (e.sym == c) return true; } return false; }
/** Look up a synthetic name in a given scope. * @param s The scope. * @param name The name. */ private Symbol lookupSynthetic(Name name, Scope s) { Symbol sym = s.lookup(name).sym; return (sym==null || (sym.flags()&SYNTHETIC)==0) ? null : sym; }
/** Given a class, is there already a class with same fully * qualified name in this (import) scope? */ public boolean includes(Symbol c) { for (Scope.Entry e = lookup(c.name); e.scope == this; e = e.next()) { if (e.sym == c) return true; } return false; }
/** Enter symbol sym in this scope if not already there. */ public void enterIfAbsent(Symbol sym) { assert shared == 0; Entry e = lookup(sym.name); while (e.scope == this && e.sym.kind != sym.kind) e = e.next(); if (e.scope != this) enter(sym); }
/** Enter symbol sym in this scope if not already there. */ public void enterIfAbsent(Symbol sym) { assert shared == 0; Entry e = lookup(sym.name); while (e.scope == this && e.sym.kind != sym.kind) e = e.next(); if (e.scope != this) enter(sym); }
/** @see com.sun.tools.javadoc.ClassDocImpl#findConstructor */ MethodSymbol findConstructor(ClassSymbol tsym, List<Type> paramTypes) { for (com.sun.tools.javac.code.Scope.Entry e = tsym.members().lookup(names.init); e.scope != null; e = e.next()) { if (e.sym.kind == Kinds.MTH) { if (hasParameterTypes((MethodSymbol) e.sym, paramTypes)) { return (MethodSymbol) e.sym; } } } return null; }
public boolean overridesObjectMethod(TypeSymbol origin, Symbol msym) { for (Scope.Entry e = syms.objectType.tsym.members().lookup(msym.name) ; e.scope != null ; e = e.next()) { if (msym.overrides(e.sym, origin, Types.this, true)) { return true; } } return false; }
/** Enter symbol sym in this scope if not already there. */ public void enterIfAbsent(Symbol sym) { Assert.check(shared == 0); Entry e = lookup(sym.name); while (e.scope == this && e.sym.kind != sym.kind) e = e.next(); if (e.scope != this) enter(sym); }
/** Enter symbol sym in this scope if not already there. */ public void enterIfAbsent(Symbol sym) { Assert.check(shared == 0); Entry e = lookup(sym.name); while (e.scope == this && e.sym.kind != sym.kind) e = e.next(); if (e.scope != this) enter(sym); }
/** @see com.sun.tools.javadoc.ClassDocImpl#findConstructor */ MethodSymbol findConstructor(ClassSymbol tsym, List<Type> paramTypes) { for (com.sun.tools.javac.code.Scope.Entry e = tsym.members().lookup(names.init); e.scope != null; e = e.next()) { if (e.sym.kind == Kinds.MTH) { if (hasParameterTypes((MethodSymbol) e.sym, paramTypes)) { return (MethodSymbol) e.sym; } } } return null; }
void checkOverride(JCTree tree, Type site, ClassSymbol origin, MethodSymbol m) { TypeSymbol c = site.tsym; Scope.Entry e = c.members().lookup(m.name); while (e.scope != null) { if (m.overrides(e.sym, origin, types, false)) { if ((e.sym.flags() & ABSTRACT) == 0) { checkOverride(tree, m, (MethodSymbol)e.sym, origin); } } e = e.next(); } }