// where
private TreeVisitor<Symbol,Env<AttrContext>> identAttributer = new IdentAttributer();
private class IdentAttributer extends SimpleTreeVisitor<Symbol,Env<AttrContext>> {
@Override
public Symbol visitMemberSelect(MemberSelectTree node, Env<AttrContext> env) {
Symbol site = visit(node.getExpression(), env);
if (site.kind == ERR)
return site;
Name name = (Name)node.getIdentifier();
if (site.kind == PCK) {
env.toplevel.packge = (PackageSymbol)site;
return rs.findIdentInPackage(env, (TypeSymbol)site, name, TYP | PCK);
} else {
env.enclClass.sym = (ClassSymbol)site;
return rs.findMemberType(env, site.asType(), name, (TypeSymbol)site);
}
}