当前位置: 首页>>代码示例>>Java>>正文


Java Options.isSet方法代码示例

本文整理汇总了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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:DocCommentParser.java

示例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");
}
 
开发者ID:sebastianoe,项目名称:s4j,代码行数:20,代码来源:MemberEnter.java

示例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);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:JavaCompiler.java

示例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");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:JNIWriter.java

示例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()
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:JNIWriter.java

示例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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:39,代码来源:Lint.java

示例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");
}
 
开发者ID:wmdietl,项目名称:jsr308-langtools,代码行数:14,代码来源:ScannerFactory.java

示例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");
}
 
开发者ID:sebastianoe,项目名称:s4j,代码行数:37,代码来源:Attr.java

示例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);
}
 
开发者ID:sebastianoe,项目名称:s4j,代码行数:5,代码来源:JavaCompiler.java


注:本文中的com.sun.tools.javac.util.Options.isSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。