Package com.sun.tools.javac.code

Examples of com.sun.tools.javac.code.Scope.enter()


            result = types.createErrorType(tree.name, (TypeSymbol)owner, Type.noType);
            tree.sym = (ClassSymbol)result.tsym;
            return;
        }
        chk.compiled.put(c.flatname, c);
        enclScope.enter(c);

        // Set up an environment for class block and store in `typeEnvs'
        // table, to be retrieved later in memberEnter and attribution.
        Env<AttrContext> localEnv = classEnv(tree, env);
        typeEnvs.put(c, localEnv);
View Full Code Here


            result = types.createErrorType(tree.name, (TypeSymbol)owner, Type.noType);
            tree.sym = (ClassSymbol)result.tsym;
            return;
        }
        chk.compiled.put(c.flatname, c);
        enclScope.enter(c);

        // Set up an environment for class block and store in `typeEnvs'
        // table, to be retrieved later in memberEnter and attribution.
        Env<AttrContext> localEnv = classEnv(tree, env);
        typeEnvs.put(c, localEnv);
View Full Code Here

            }
            // Replace the entered symbol for this variable
            Scope sc = tree.sym.owner.members();
            if (sc != null) {
                sc.remove(tree.sym);
                sc.enter(xsym);
            }
        } else {
            super.visitVarDef(tree);
        }
    }
View Full Code Here

            return;
        }
        chk.compiled.put(c.flatname, c);
        // CEYLON(stef): don't add anonymous classes to the environment
        if(tree.name.length() != 0)
            enclScope.enter(c);

        // Set up an environment for class block and store in `typeEnvs'
        // table, to be retrieved later in memberEnter and attribution.
        Env<AttrContext> localEnv = classEnv(tree, env);
        typeEnvs.put(c, localEnv);
View Full Code Here

                    Scope toScope = starImportScope;
                    // The following lines are taken from MemberEnter.importAll,
                    // before the use of StarImportScope.importAll.
                    for (Scope.Entry e = fromScope.elems; e != null; e = e.sibling) {
                        if (e.sym.kind == TYP && !toScope.includes(e.sym))
                            toScope.enter(e.sym, fromScope);
                    }
                }

                for (Scope.Entry e = members.elems; e != null; e = e.sibling) {
                    starImportModel.enter(e.sym);
View Full Code Here

            Scope toScope = starImportScope;
            // The following lines are taken from MemberEnter.importAll,
            // before the use of StarImportScope.importAll.
            for (Scope.Entry e = fromScope.elems; e != null; e = e.sibling) {
                if (e.sym.kind == TYP && !toScope.includes(e.sym))
                    toScope.enter(e.sym, fromScope);
            }
        }

        dump("imported p", starImportScope);
View Full Code Here

         */
        Scope createScope(int nelems) {
            Scope s = new Scope(symtab.noSymbol);
            for (int i = 0 ; i < nelems ; i++) {
                Symbol sym = new TypeSymbol(0, names.fromString("s" + i), null, null);
                s.enter(sym);
                elems = elems.prepend(sym);
                List<Symbol> shadowed = shadowedMap.get(sym.name);
                if (shadowed == null) {
                    shadowed = List.nil();
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.