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


Java Log.warning方法代码示例

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


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

示例1: importStringToPattern

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
/**
 * Convert import-style string for supported annotations into a
 * regex matching that string.  If the string is not a valid
 * import-style string, return a regex that won't match anything.
 */
private static Pattern importStringToPattern(boolean allowModules, String s, Processor p, Log log) {
    String module;
    String pkg;
    int slash = s.indexOf('/');
    if (slash == (-1)) {
        if (s.equals("*")) {
            return MatchingUtils.validImportStringToPattern(s);
        }
        module = allowModules ? ".*/" : "";
        pkg = s;
    } else {
        module = Pattern.quote(s.substring(0, slash + 1));
        pkg = s.substring(slash + 1);
    }
    if (MatchingUtils.isValidImportString(pkg)) {
        return Pattern.compile(module + MatchingUtils.validImportStringToPatternString(pkg));
    } else {
        log.warning(Warnings.ProcMalformedSupportedString(s, p.getClass().getName()));
        return noMatches; // won't match any valid identifier
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:JavacProcessingEnvironment.java

示例2: checkSourceVersionCompatibility

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
/**
 * Checks whether or not a processor's source version is
 * compatible with the compilation source version.  The
 * processor's source version needs to be greater than or
 * equal to the source version of the compile.
 */
private void checkSourceVersionCompatibility(Source source, Log log) {
    SourceVersion procSourceVersion = processor.getSupportedSourceVersion();

    if (procSourceVersion.compareTo(Source.toSourceVersion(source)) < 0 )  {
        log.warning("proc.processor.incompatible.source.version",
                    procSourceVersion,
                    processor.getClass().getName(),
                    source.name);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:17,代码来源:JavacProcessingEnvironment.java

示例3: importStringToPattern

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
/**
 * Convert import-style string for supported annotations into a
 * regex matching that string.  If the string is a valid
 * import-style string, return a regex that won't match anything.
 */
private static Pattern importStringToPattern(String s, Processor p, Log log) {
    if (isValidImportString(s)) {
        return validImportStringToPattern(s);
    } else {
        log.warning("proc.malformed.supported.string", s, p.getClass().getName());
        return noMatches; // won't match any valid identifier
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:14,代码来源:JavacProcessingEnvironment.java

示例4: checkSourceVersionCompatibility

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
/**
 * Checks whether or not a processor's source version is
 * compatible with the compilation source version.  The
 * processor's source version needs to be greater than or
 * equal to the source version of the compile.
 */
private void checkSourceVersionCompatibility(Source source, Log log) {
    SourceVersion procSourceVersion = processor.getSupportedSourceVersion();

    if (procSourceVersion.compareTo(Source.toSourceVersion(source)) < 0 )  {
        log.warning(Warnings.ProcProcessorIncompatibleSourceVersion(procSourceVersion,
                                                                    processor.getClass().getName(),
                                                                    source.name));
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:JavacProcessingEnvironment.java


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