/** Duplicate this context, replacing scope field and copying all others. */ AttrContext dup(Scope scope) { AttrContext info = new AttrContext(); info.scope = scope; info.staticLevel = staticLevel; info.isSelfCall = isSelfCall; info.selectSuper = selectSuper; info.varArgs = varArgs; info.tvars = tvars; info.lint = lint; return info; }
ctx.tree.getTag() == Tag.CLASSDEF ? ((ClassSymbol) ASTHelpers.getSymbol(ctx.tree)).members().getSymbols() : ctx.info.getLocalElements()) .flatMap( symbols ->
/** Duplicate this context, copying all fields. */ AttrContext dup() { return dup(scope); }
Env<AttrContext> localEnv = env.dup(tree, env.info.dup()); rsEnv, new ResultInfo(pkind, newMethodTemplate(syms.voidType, argtypes, typeargtypes))); if (rsEnv.info.lastResolveVarargs()) Assert.check(tree.constructorType.isErroneous() || tree.varargsElement != null);
sym = selectSym(tree, sitesym, site, env, resultInfo); boolean varArgs = env.info.lastResolveVarargs(); tree.sym = sym;
Env<AttrContext> localEnv = env.dup(tree, env.info.dup()); rsEnv, new ResultInfo(pkind, newMethodTemplate(syms.voidType, argtypes, typeargtypes))); if (rsEnv.info.lastResolveVarargs()) Assert.check(tree.constructorType.isErroneous() || tree.varargsElement != null);
sym = selectSym(tree, sitesym, site, env, resultInfo); boolean varArgs = env.info.lastResolveVarargs(); tree.sym = sym;
/** Duplicate this context, copying all fields. */ AttrContext dup() { return dup(scope); }
/** Duplicate this context, replacing scope field and copying all others. */ AttrContext dup(Scope scope) { AttrContext info = new AttrContext(); info.scope = scope; info.staticLevel = staticLevel; info.isSelfCall = isSelfCall; info.selectSuper = selectSuper; info.varArgs = varArgs; info.tvars = tvars; info.lint = lint; return info; }
Streams.stream(Iterables.concat(env.info.getLocalElements(), enclosingTypes)) .map(sym -> sym.getSimpleName().toString()) .collect(ImmutableSet.toImmutableSet());
return chk.checkMethod(owntype, sym, env, argtrees, argtypes, env.info.lastResolveVarargs(), resultInfo.checkContext.inferenceContext()); } catch (Infer.InferenceException ex) {
/** Duplicate this context, copying all fields. */ AttrContext dup() { return dup(scope); }
/** Duplicate this context, replacing scope field and copying all others. */ AttrContext dup(Scope scope) { AttrContext info = new AttrContext(); info.scope = scope; info.staticLevel = staticLevel; info.isSelfCall = isSelfCall; info.selectSuper = selectSuper; info.pendingResolutionPhase = pendingResolutionPhase; info.lint = lint; info.enclVar = enclVar; info.returnResult = returnResult; info.defaultSuperCallSite = defaultSuperCallSite; return info; }
public Iterable<? extends Element> getLocalElements() { return env.info.getLocalElements(); }
return chk.checkMethod(owntype, sym, env, argtrees, argtypes, env.info.lastResolveVarargs(), resultInfo.checkContext.inferenceContext()); } catch (Infer.InferenceException ex) {
/** Duplicate this context, copying all fields. */ AttrContext dup() { return dup(scope); }
/** Duplicate this context, replacing scope field and copying all others. */ AttrContext dup(Scope scope) { AttrContext info = new AttrContext(); info.scope = scope; info.staticLevel = staticLevel; info.isSelfCall = isSelfCall; info.selectSuper = selectSuper; info.pendingResolutionPhase = pendingResolutionPhase; info.lint = lint; info.enclVar = enclVar; info.returnResult = returnResult; info.defaultSuperCallSite = defaultSuperCallSite; info.isSerializable = isSerializable; info.preferredTreeForDiagnostics = preferredTreeForDiagnostics; return info; }
public Iterable<? extends Element> getLocalElements() { return env.info.getLocalElements(); }
public Type attribType(JCTree node, TypeSymbol sym) { Env<AttrContext> env = enter.typeEnvs.get(sym); Env<AttrContext> localEnv = env.dup(node, env.info.dup()); return attribTree(node, localEnv, Kinds.TYP, Type.noType); }
public Env<AttrContext> getTopLevelEnv(JCCompilationUnit tree) { Env<AttrContext> localEnv = new Env<AttrContext>(tree, new AttrContext()); localEnv.toplevel = tree; localEnv.enclClass = predefClassDef; localEnv.info.scope = tree.namedImportScope; localEnv.info.lint = lint; return localEnv; }