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


Java LintCategory.DEPRECATION属性代码示例

本文整理汇总了Java中com.sun.tools.javac.code.Lint.LintCategory.DEPRECATION属性的典型用法代码示例。如果您正苦于以下问题:Java LintCategory.DEPRECATION属性的具体用法?Java LintCategory.DEPRECATION怎么用?Java LintCategory.DEPRECATION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.tools.javac.code.Lint.LintCategory的用法示例。


在下文中一共展示了LintCategory.DEPRECATION属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Check

protected Check(Context context) {
    context.put(checkKey, this);

    names = Names.instance(context);
    log = Log.instance(context);
    syms = Symtab.instance(context);
    enter = Enter.instance(context);
    infer = Infer.instance(context);
    this.types = Types.instance(context);
    diags = JCDiagnostic.Factory.instance(context);
    Options options = Options.instance(context);
    lint = Lint.instance(context);
    treeinfo = TreeInfo.instance(context);

    Source source = Source.instance(context);
    allowGenerics = source.allowGenerics();
    allowAnnotations = source.allowAnnotations();
    allowCovariantReturns = source.allowCovariantReturns();
    allowSimplifiedVarargs = source.allowSimplifiedVarargs();
    complexInference = options.isSet(COMPLEXINFERENCE);
    skipAnnotations = options.isSet("skipAnnotations");
    warnOnSyntheticConflicts = options.isSet("warnOnSyntheticConflicts");
    suppressAbortOnBadClassFile = options.isSet("suppressAbortOnBadClassFile");
    enableSunApiLintControl = options.isSet("enableSunApiLintControl");

    Target target = Target.instance(context);
    syntheticNameChar = target.syntheticNameChar();

    boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
    boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
    boolean verboseSunApi = lint.isEnabled(LintCategory.SUNAPI);
    boolean enforceMandatoryWarnings = source.enforceMandatoryWarnings();

    deprecationHandler = new MandatoryWarningHandler(log, verboseDeprecated,
            enforceMandatoryWarnings, "deprecated", LintCategory.DEPRECATION);
    uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked,
            enforceMandatoryWarnings, "unchecked", LintCategory.UNCHECKED);
    sunApiHandler = new MandatoryWarningHandler(log, verboseSunApi,
            enforceMandatoryWarnings, "sunapi", null);

    deferredLintHandler = DeferredLintHandler.immediateHandler;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:42,代码来源:Check.java

示例2: Check

protected Check(Context context) {
    context.put(checkKey, this);

    names = Names.instance(context);
    dfltTargetMeta = new Name[] { names.PACKAGE, names.TYPE,
        names.FIELD, names.METHOD, names.CONSTRUCTOR,
        names.ANNOTATION_TYPE, names.LOCAL_VARIABLE, names.PARAMETER};
    log = Log.instance(context);
    rs = Resolve.instance(context);
    syms = Symtab.instance(context);
    enter = Enter.instance(context);
    deferredAttr = DeferredAttr.instance(context);
    infer = Infer.instance(context);
    types = Types.instance(context);
    diags = JCDiagnostic.Factory.instance(context);
    Options options = Options.instance(context);
    lint = Lint.instance(context);
    treeinfo = TreeInfo.instance(context);
    fileManager = context.get(JavaFileManager.class);

    Source source = Source.instance(context);
    allowGenerics = source.allowGenerics();
    allowVarargs = source.allowVarargs();
    allowAnnotations = source.allowAnnotations();
    allowCovariantReturns = source.allowCovariantReturns();
    allowSimplifiedVarargs = source.allowSimplifiedVarargs();
    allowDefaultMethods = source.allowDefaultMethods();
    allowStrictMethodClashCheck = source.allowStrictMethodClashCheck();
    complexInference = options.isSet("complexinference");
    warnOnSyntheticConflicts = options.isSet("warnOnSyntheticConflicts");
    suppressAbortOnBadClassFile = options.isSet("suppressAbortOnBadClassFile");
    enableSunApiLintControl = options.isSet("enableSunApiLintControl");
    warnOnAccessToSensitiveMembers = options.isSet("warnOnAccessToSensitiveMembers");

    Target target = Target.instance(context);
    syntheticNameChar = target.syntheticNameChar();

    profile = Profile.instance(context);

    boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
    boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
    boolean verboseSunApi = lint.isEnabled(LintCategory.SUNAPI);
    boolean enforceMandatoryWarnings = source.enforceMandatoryWarnings();

    deprecationHandler = new MandatoryWarningHandler(log, verboseDeprecated,
            enforceMandatoryWarnings, "deprecated", LintCategory.DEPRECATION);
    uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked,
            enforceMandatoryWarnings, "unchecked", LintCategory.UNCHECKED);
    sunApiHandler = new MandatoryWarningHandler(log, verboseSunApi,
            enforceMandatoryWarnings, "sunapi", null);

    deferredLintHandler = DeferredLintHandler.instance(context);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:53,代码来源:Check.java

示例3: Check

protected Check(Context context) {
    context.put(checkKey, this);

    names = Names.instance(context);
    dfltTargetMeta = new Name[] { names.PACKAGE, names.TYPE,
        names.FIELD, names.METHOD, names.CONSTRUCTOR,
        names.ANNOTATION_TYPE, names.LOCAL_VARIABLE, names.PARAMETER};
    log = Log.instance(context);
    rs = Resolve.instance(context);
    syms = Symtab.instance(context);
    enter = Enter.instance(context);
    deferredAttr = DeferredAttr.instance(context);
    infer = Infer.instance(context);
    types = Types.instance(context);
    typeAnnotations = TypeAnnotations.instance(context);
    diags = JCDiagnostic.Factory.instance(context);
    Options options = Options.instance(context);
    lint = Lint.instance(context);
    fileManager = context.get(JavaFileManager.class);

    source = Source.instance(context);
    allowSimplifiedVarargs = source.allowSimplifiedVarargs();
    allowDefaultMethods = source.allowDefaultMethods();
    allowStrictMethodClashCheck = source.allowStrictMethodClashCheck();
    allowPrivateSafeVarargs = source.allowPrivateSafeVarargs();
    allowDiamondWithAnonymousClassCreation = source.allowDiamondWithAnonymousClassCreation();
    warnOnAnyAccessToMembers = options.isSet("warnOnAccessToMembers");

    Target target = Target.instance(context);
    syntheticNameChar = target.syntheticNameChar();

    profile = Profile.instance(context);

    boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
    boolean verboseRemoval = lint.isEnabled(LintCategory.REMOVAL);
    boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
    boolean enforceMandatoryWarnings = true;

    deprecationHandler = new MandatoryWarningHandler(log, verboseDeprecated,
            enforceMandatoryWarnings, "deprecated", LintCategory.DEPRECATION);
    removalHandler = new MandatoryWarningHandler(log, verboseRemoval,
            enforceMandatoryWarnings, "removal", LintCategory.REMOVAL);
    uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked,
            enforceMandatoryWarnings, "unchecked", LintCategory.UNCHECKED);
    sunApiHandler = new MandatoryWarningHandler(log, false,
            enforceMandatoryWarnings, "sunapi", null);

    deferredLintHandler = DeferredLintHandler.instance(context);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:49,代码来源:Check.java


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