/** Check for a lint suboption. */ public boolean lint(String s) { // return true if either the specific option is enabled, or // they are all enabled without the specific one being // disabled return isSet(XLINT_CUSTOM, s) || (isSet(XLINT) || isSet(XLINT_CUSTOM, "all")) && isUnset(XLINT_CUSTOM, "-" + s); } }
private void initOptions(Options options) { if (options.isSet("onlySyntaxErrorsUnrecoverable")) defaultErrorFlags.add(DiagnosticFlag.RECOVERABLE); }
/** Check for a lint suboption. */ public boolean lint(String s) { // return true if either the specific option is enabled, or // they are all enabled without the specific one being // disabled return isSet(XLINT_CUSTOM, s) || (isSet(XLINT) || isSet(XLINT_CUSTOM, "all")) && isUnset(XLINT_CUSTOM, "-" + s); } }
private void initOptions(Options options) { if (options.isSet("onlySyntaxErrorsUnrecoverable")) defaultErrorFlags.add(DiagnosticFlag.RECOVERABLE); }
/** Print a message reporting a fatal error. */ void feMessage(Throwable ex) { log.printRawLines(ex.getMessage()); if (ex.getCause() != null && options.isSet("dev")) { ex.getCause().printStackTrace(log.getWriter(WriterKind.NOTICE)); } }
/** Print a message reporting a fatal error. */ void feMessage(Throwable ex) { log.printRawLines(ex.getMessage()); if (ex.getCause() != null && options.isSet("dev")) { ex.getCause().printStackTrace(log.getWriter(WriterKind.NOTICE)); } }
DocCommentParser(ParserFactory fac, DiagnosticSource diagSource, Comment comment) { this.fac = fac; this.diagSource = diagSource; this.comment = comment; names = fac.names; m = fac.docTreeMaker; Locale locale = (fac.locale == null) ? Locale.getDefault() : fac.locale; Options options = fac.options; boolean useBreakIterator = options.isSet("breakIterator"); if (useBreakIterator || !locale.getLanguage().equals(Locale.ENGLISH.getLanguage())) sentenceBreaker = BreakIterator.getSentenceInstance(locale); initTagParsers(); }
DocCommentParser(ParserFactory fac, DiagnosticSource diagSource, Comment comment) { this.fac = fac; this.diagSource = diagSource; this.comment = comment; names = fac.names; m = fac.docTreeMaker; Locale locale = (fac.locale == null) ? Locale.getDefault() : fac.locale; Options options = fac.options; boolean useBreakIterator = options.isSet("breakIterator"); if (useBreakIterator || !locale.getLanguage().equals(Locale.ENGLISH.getLanguage())) sentenceBreaker = BreakIterator.getSentenceInstance(locale); initTagParsers(); }
private void initOptions(Options options) { this.dumpOnError = options.isSet(DOE); this.promptOnError = options.isSet(PROMPT); this.emitWarnings = options.isUnset(XLINT_CUSTOM, "none"); this.suppressNotes = options.isSet("suppressNotes"); this.MaxErrors = getIntOption(options, XMAXERRS, getDefaultMaxErrors()); this.MaxWarnings = getIntOption(options, XMAXWARNS, getDefaultMaxWarnings()); boolean rawDiagnostics = options.isSet("rawDiagnostics"); this.diagFormatter = rawDiagnostics ? new RawDiagnosticFormatter(options) : new BasicDiagnosticFormatter(options, messages); String ek = options.get("expectKeys"); if (ek != null) expectDiagKeys = new HashSet<String>(Arrays.asList(ek.split(", *"))); }
protected Name.Table createTable(Options options) { boolean useUnsharedTable = options.isSet("useUnsharedTable"); if (useUnsharedTable) return new UnsharedNameTable(this); else return new SharedNameTable(this); }
private void initOptions(Options options) { this.dumpOnError = options.isSet(DOE); this.promptOnError = options.isSet(PROMPT); this.emitWarnings = options.isUnset(XLINT_CUSTOM, "none"); this.suppressNotes = options.isSet("suppressNotes"); this.MaxErrors = getIntOption(options, XMAXERRS, getDefaultMaxErrors()); this.MaxWarnings = getIntOption(options, XMAXWARNS, getDefaultMaxWarnings()); boolean rawDiagnostics = options.isSet("rawDiagnostics"); this.diagFormatter = rawDiagnostics ? new RawDiagnosticFormatter(options) : new BasicDiagnosticFormatter(options, messages); String ek = options.get("expectKeys"); if (ek != null) expectDiagKeys = new HashSet<String>(Arrays.asList(ek.split(", *"))); }
protected Name.Table createTable(Options options) { boolean useUnsharedTable = options.isSet("useUnsharedTable"); if (useUnsharedTable) return new UnsharedNameTable(this); else return new SharedNameTable(this); }
/** Construct a class writer, given an options table. */ private JNIWriter(Context context) { context.put(jniWriterKey, this); fileManager = context.get(JavaFileManager.class); log = Log.instance(context); Options options = Options.instance(context); verbose = options.isSet(VERBOSE); checkAll = options.isSet("javah:full"); this.context = context; // for lazyInit() syms = Symtab.instance(context); lineSep = System.getProperty("line.separator"); }
/** Construct a class writer, given an options table. */ private JNIWriter(Context context) { context.put(jniWriterKey, this); fileManager = context.get(JavaFileManager.class); log = Log.instance(context); Options options = Options.instance(context); verbose = options.isSet(VERBOSE); checkAll = options.isSet("javah:full"); this.context = context; // for lazyInit() syms = Symtab.instance(context); lineSep = System.getProperty("line.separator"); }
/** * Set the context for JavacFileManager. */ @Override public void setContext(Context context) { super.setContext(context); fsInfo = FSInfo.instance(context); contextUseOptimizedZip = options.getBoolean("useOptimizedZip", true); if (contextUseOptimizedZip) zipFileIndexCache = ZipFileIndexCache.getSharedInstance(); mmappedIO = options.isSet("mmappedIO"); symbolFileEnabled = !options.isSet("ignore.symbol.file"); String sf = options.get("sortFiles"); if (sf != null) { sortFiles = (sf.equals("reverse") ? SortFiles.REVERSE : SortFiles.FORWARD); } }
/** * Set the context for JavacFileManager. */ @Override public void setContext(Context context) { super.setContext(context); fsInfo = FSInfo.instance(context); contextUseOptimizedZip = options.getBoolean("useOptimizedZip", true); if (contextUseOptimizedZip) zipFileIndexCache = ZipFileIndexCache.getSharedInstance(); mmappedIO = options.isSet("mmappedIO"); symbolFileEnabled = !options.isSet("ignore.symbol.file"); String sf = options.get("sortFiles"); if (sf != null) { sortFiles = (sf.equals("reverse") ? SortFiles.REVERSE : SortFiles.FORWARD); } }
private LambdaToMethod(Context context) { context.put(unlambdaKey, this); diags = JCDiagnostic.Factory.instance(context); log = Log.instance(context); lower = Lower.instance(context); names = Names.instance(context); syms = Symtab.instance(context); rs = Resolve.instance(context); make = TreeMaker.instance(context); types = Types.instance(context); transTypes = TransTypes.instance(context); analyzer = new LambdaAnalyzerPreprocessor(); Options options = Options.instance(context); dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats"); attr = Attr.instance(context); forceSerializable = options.isSet("forceSerializable"); } // </editor-fold>
private LambdaToMethod(Context context) { context.put(unlambdaKey, this); diags = JCDiagnostic.Factory.instance(context); log = Log.instance(context); lower = Lower.instance(context); names = Names.instance(context); syms = Symtab.instance(context); rs = Resolve.instance(context); make = TreeMaker.instance(context); types = Types.instance(context); transTypes = TransTypes.instance(context); analyzer = new LambdaAnalyzerPreprocessor(); Options options = Options.instance(context); dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats"); attr = Attr.instance(context); } // </editor-fold>