/** Construct a parser from a given scanner, tree factory and log. */ protected Parser(Factory fac, Lexer S, boolean keepDocComments) { this.S = S; S.nextToken(); // prime the pump this.F = fac.F; this.log = fac.log; this.names = fac.names; this.keywords = fac.keywords; this.source = fac.source; Options options = fac.options; this.allowGenerics = source.allowGenerics(); this.allowVarargs = source.allowVarargs(); this.allowAsserts = source.allowAsserts(); this.allowEnums = source.allowEnums(); this.allowForeach = source.allowForeach(); this.allowStaticImport = source.allowStaticImport(); this.allowAnnotations = source.allowAnnotations(); this.keepDocComments = keepDocComments; if (keepDocComments) docComments = new HashMap<JCTree,String>(); this.errorTree = F.Erroneous(); }
this.allowForeach = source.allowForeach(); this.allowStaticImport = source.allowStaticImport(); this.allowAnnotations = source.allowAnnotations(); this.allowTWR = source.allowTryWithResources(); this.allowDiamond = source.allowDiamond();
/** Construct a parser from a given scanner, tree factory and log. */ protected Parser(Factory fac, Lexer S, boolean keepDocComments) { this.S = S; S.nextToken(); // prime the pump this.F = fac.F; this.log = fac.log; this.names = fac.names; this.keywords = fac.keywords; this.source = fac.source; Options options = fac.options; this.allowGenerics = source.allowGenerics(); this.allowVarargs = source.allowVarargs(); this.allowAsserts = source.allowAsserts(); this.allowEnums = source.allowEnums(); this.allowForeach = source.allowForeach(); this.allowStaticImport = source.allowStaticImport(); this.allowAnnotations = source.allowAnnotations(); this.keepDocComments = keepDocComments; if (keepDocComments) docComments = new HashMap<JCTree,String>(); this.errorTree = F.Erroneous(); }
/** Construct a new class reader, optionally treated as the * definitive classreader for this invocation. */ protected ClassReader(Context context, boolean definitive) { if (definitive) context.put(classReaderKey, this); names = Name.Table.instance(context); syms = Symtab.instance(context); types = Types.instance(context); fileManager = context.get(JavaFileManager.class); if (fileManager == null) throw new AssertionError("FileManager initialization error"); init(syms, definitive); log = Log.instance(context); Options options = Options.instance(context); annotate = Annotate.instance(context); verbose = options.get("-verbose") != null; checkClassFile = options.get("-checkclassfile") != null; Source source = Source.instance(context); allowGenerics = source.allowGenerics(); allowVarargs = source.allowVarargs(); allowAnnotations = source.allowAnnotations(); saveParameterNames = options.get("save-parameter-names") != null; cacheCompletionFailure = options.get("dev") == null; preferSource = "source".equals(options.get("-Xprefer")); completionFailureName = (options.get("failcomplete") != null) ? names.fromString(options.get("failcomplete")) : null; typevars = new Scope(syms.noSymbol); }
/** Construct a new class reader, optionally treated as the * definitive classreader for this invocation. */ protected ClassReader(Context context, boolean definitive) { if (definitive) context.put(classReaderKey, this); names = Name.Table.instance(context); syms = Symtab.instance(context); types = Types.instance(context); fileManager = context.get(JavaFileManager.class); if (fileManager == null) throw new AssertionError("FileManager initialization error"); init(syms, definitive); log = Log.instance(context); Options options = Options.instance(context); annotate = Annotate.instance(context); verbose = options.get("-verbose") != null; checkClassFile = options.get("-checkclassfile") != null; Source source = Source.instance(context); allowGenerics = source.allowGenerics(); allowVarargs = source.allowVarargs(); allowAnnotations = source.allowAnnotations(); saveParameterNames = options.get("save-parameter-names") != null; cacheCompletionFailure = options.get("dev") == null; preferSource = "source".equals(options.get("-Xprefer")); completionFailureName = (options.get("failcomplete") != null) ? names.fromString(options.get("failcomplete")) : null; typevars = new Scope(syms.noSymbol); }
allowGenerics = source.allowGenerics(); allowVarargs = source.allowVarargs(); allowAnnotations = source.allowAnnotations(); allowSimplifiedVarargs = source.allowSimplifiedVarargs();
allowGenerics = source.allowGenerics(); allowVarargs = source.allowVarargs(); allowAnnotations = source.allowAnnotations(); allowSimplifiedVarargs = source.allowSimplifiedVarargs(); allowDefaultMethods = source.allowDefaultMethods();
protected Check(Context context) { context.put(checkKey, this); names = Name.Table.instance(context); log = Log.instance(context); syms = Symtab.instance(context); infer = Infer.instance(context); this.types = Types.instance(context); Options options = Options.instance(context); target = Target.instance(context); source = Source.instance(context); lint = Lint.instance(context); treeinfo = TreeInfo.instance(context); Source source = Source.instance(context); allowGenerics = source.allowGenerics(); allowAnnotations = source.allowAnnotations(); complexInference = options.get("-complexinference") != null; skipAnnotations = options.get("skipAnnotations") != null; boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION); boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED); deprecationHandler = new MandatoryWarningHandler(log,verboseDeprecated, "deprecated"); uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked, "unchecked"); }
protected Check(Context context) { context.put(checkKey, this); names = Name.Table.instance(context); log = Log.instance(context); syms = Symtab.instance(context); infer = Infer.instance(context); this.types = Types.instance(context); Options options = Options.instance(context); target = Target.instance(context); source = Source.instance(context); lint = Lint.instance(context); treeinfo = TreeInfo.instance(context); Source source = Source.instance(context); allowGenerics = source.allowGenerics(); allowAnnotations = source.allowAnnotations(); complexInference = options.get("-complexinference") != null; skipAnnotations = options.get("skipAnnotations") != null; boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION); boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED); boolean enforceMandatoryWarnings = source.enforceMandatoryWarnings(); deprecationHandler = new MandatoryWarningHandler(log,verboseDeprecated, enforceMandatoryWarnings, "deprecated"); uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked, enforceMandatoryWarnings, "unchecked"); }
this.allowForeach = source.allowForeach(); this.allowStaticImport = source.allowStaticImport(); this.allowAnnotations = source.allowAnnotations(); this.allowTWR = source.allowTryWithResources(); this.allowDiamond = source.allowDiamond();
allowGenerics = source.allowGenerics(); allowVarargs = source.allowVarargs(); allowAnnotations = source.allowAnnotations(); allowCovariantReturns = source.allowCovariantReturns(); allowSimplifiedVarargs = source.allowSimplifiedVarargs();
allowGenerics = source.allowGenerics(); allowVarargs = source.allowVarargs(); allowAnnotations = source.allowAnnotations(); allowCovariantReturns = source.allowCovariantReturns(); allowSimplifiedVarargs = source.allowSimplifiedVarargs();