本文整理汇总了Java中com.sun.tools.javac.util.Options.isSet方法的典型用法代码示例。如果您正苦于以下问题:Java Options.isSet方法的具体用法?Java Options.isSet怎么用?Java Options.isSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.javac.util.Options
的用法示例。
在下文中一共展示了Options.isSet方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DocCommentParser
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
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();
}
示例2: MemberEnter
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
protected MemberEnter(Context context) {
context.put(memberEnterKey, this);
names = Names.instance(context);
enter = Enter.instance(context);
log = Log.instance(context);
chk = Check.instance(context);
attr = Attr.instance(context);
syms = Symtab.instance(context);
make = TreeMaker.instance(context);
reader = ClassReader.instance(context);
todo = Todo.instance(context);
annotate = Annotate.instance(context);
types = Types.instance(context);
diags = JCDiagnostic.Factory.instance(context);
target = Target.instance(context);
deferredLintHandler = DeferredLintHandler.instance(context);
Options options = Options.instance(context);
skipAnnotations = options.isSet("skipAnnotations");
}
示例3: explicitAnnotationProcessingRequested
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
static boolean explicitAnnotationProcessingRequested(Options options) {
return
options.isSet(PROCESSOR) ||
options.isSet(PROCESSORPATH) ||
options.isSet(PROC, "only") ||
options.isSet(XPRINT);
}
示例4: JNIWriter
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
/** 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");
}
示例5: JNIWriter
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
/** 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()
}
示例6: Lint
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
protected Lint(Context context) {
// initialize values according to the lint options
Options options = Options.instance(context);
if (options.isSet(Option.XLINT) || options.isSet(Option.XLINT_CUSTOM, "all")) {
// If -Xlint or -Xlint:all is given, enable all categories by default
values = EnumSet.allOf(LintCategory.class);
} else if (options.isSet(Option.XLINT_CUSTOM, "none")) {
// if -Xlint:none is given, disable all categories by default
values = EnumSet.noneOf(LintCategory.class);
} else {
// otherwise, enable on-by-default categories
values = EnumSet.noneOf(LintCategory.class);
Source source = Source.instance(context);
if (source.compareTo(Source.JDK1_9) >= 0) {
values.add(LintCategory.DEP_ANN);
}
values.add(LintCategory.REQUIRES_TRANSITIVE_AUTOMATIC);
values.add(LintCategory.OPENS);
values.add(LintCategory.MODULE);
values.add(LintCategory.REMOVAL);
}
// Look for specific overrides
for (LintCategory lc : LintCategory.values()) {
if (options.isSet(Option.XLINT_CUSTOM, lc.option)) {
values.add(lc);
} else if (options.isSet(Option.XLINT_CUSTOM, "-" + lc.option)) {
values.remove(lc);
}
}
suppressedValues = EnumSet.noneOf(LintCategory.class);
context.put(lintKey, this);
augmentor = new AugmentVisitor(context);
}
示例7: ScannerFactory
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
/** Create a new scanner factory. */
protected ScannerFactory(Context context) {
context.put(scannerFactoryKey, this);
this.log = Log.instance(context);
this.names = Names.instance(context);
this.source = Source.instance(context);
this.tokens = Tokens.instance(context);
Options options = Options.instance(context);
this.annotationsincomments = this.source.allowTypeAnnotations() &&
options.isUnset("TA:noannotationsincomments");
this.spacesincomments = options.isSet("TA:spacesincomments");
}
示例8: Attr
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
protected Attr(Context context) {
context.put(attrKey, this);
names = Names.instance(context);
log = Log.instance(context);
syms = Symtab.instance(context);
rs = Resolve.instance(context);
chk = Check.instance(context);
memberEnter = MemberEnter.instance(context);
make = TreeMaker.instance(context);
enter = Enter.instance(context);
infer = Infer.instance(context);
cfolder = ConstFold.instance(context);
target = Target.instance(context);
types = Types.instance(context);
diags = JCDiagnostic.Factory.instance(context);
annotate = Annotate.instance(context);
deferredLintHandler = DeferredLintHandler.instance(context);
Options options = Options.instance(context);
Source source = Source.instance(context);
allowGenerics = source.allowGenerics();
allowVarargs = source.allowVarargs();
allowEnums = source.allowEnums();
allowBoxing = source.allowBoxing();
allowCovariantReturns = source.allowCovariantReturns();
allowAnonOuterThis = source.allowAnonOuterThis();
allowStringsInSwitch = source.allowStringsInSwitch();
sourceName = source.name;
relax = (options.isSet("-retrofit") ||
options.isSet("-relax"));
findDiamonds = options.get("findDiamond") != null &&
source.allowDiamond();
useBeforeDeclarationWarning = options.isSet("useBeforeDeclarationWarning");
}
示例9: explicitAnnotationProcessingRequested
import com.sun.tools.javac.util.Options; //导入方法依赖的package包/类
static boolean explicitAnnotationProcessingRequested(Options options) {
return options.isSet(PROCESSOR) || options.isSet(PROCESSORPATH)
|| options.isSet(PROC, "only") || options.isSet(XPRINT);
}