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


Java Log.error方法代码示例

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


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

示例1: replaceOne

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
private <T extends Attribute.Compound> T replaceOne(Placeholder<T> placeholder, Annotate.AnnotateRepeatedContext<T> ctx) {
    Log log = ctx.log;

    // Process repeated annotations
    T validRepeated = ctx.processRepeatedAnnotations(placeholder.getPlaceholderFor(), sym);

    if (validRepeated != null) {
        // Check that the container isn't manually
        // present along with repeated instances of
        // its contained annotation.
        ListBuffer<T> manualContainer = ctx.annotated.get(validRepeated.type.tsym);
        if (manualContainer != null) {
            log.error(ctx.pos.get(manualContainer.first()), "invalid.repeatable.annotation.repeated.and.container.present",
                    manualContainer.first().type.tsym);
        }
    }

    // A null return will delete the Placeholder
    return validRepeated;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:SymbolMetadata.java

示例2: checkOptionName

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
private boolean checkOptionName(String optionName, Log log) {
    boolean valid = isValidOptionName(optionName);
    if (!valid)
        log.error("proc.processor.bad.option.name",
                    optionName,
                    processor.getClass().getName());
    return valid;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:9,代码来源:JavacProcessingEnvironment.java

示例3: ServiceIterator

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
ServiceIterator(ClassLoader classLoader, Log log) {
    this.log = log;
    try {
        try {
            loader = ServiceLoader.load(Processor.class, classLoader);
            this.iterator = loader.iterator();
        } catch (Exception e) {
            // Fail softly if a loader is not actually needed.
            this.iterator = handleServiceLoaderUnavailability("proc.no.service", null);
        }
    } catch (Throwable t) {
        log.error("proc.service.problem");
        throw new Abort(t);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:JavacProcessingEnvironment.java

示例4: ServiceIterator

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
ServiceIterator(ClassLoader classLoader, Log log) {
    this.log = log;
    try {
        try {
            loader = ServiceLoader.load(Processor.class, classLoader);
            this.iterator = loader.iterator();
        } catch (Exception e) {
            // Fail softly if a loader is not actually needed.
            this.iterator = handleServiceLoaderUnavailability("proc.no.service", null);
        }
    } catch (Throwable t) {
        log.error(Errors.ProcServiceProblem);
        throw new Abort(t);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:JavacProcessingEnvironment.java

示例5: checkOptionName

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
private boolean checkOptionName(String optionName, Log log) {
    boolean valid = isValidOptionName(optionName);
    if (!valid)
        log.error(Errors.ProcProcessorBadOptionName(optionName,
                                                    processor.getClass().getName()));
    return valid;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:JavacProcessingEnvironment.java

示例6: ServiceIterator

import com.sun.tools.javac.util.Log; //导入方法依赖的package包/类
ServiceIterator(ClassLoader classLoader, Log log) {
    String loadMethodName;

    this.log = log;
    try {
        try {
            loaderClass = Class.forName("java.util.ServiceLoader");
            loadMethodName = "load";
            jusl = true;
        } catch (ClassNotFoundException cnfe) {
            try {
                loaderClass = Class.forName("sun.misc.Service");
                loadMethodName = "providers";
                jusl = false;
            } catch (ClassNotFoundException cnfe2) {
                // Fail softly if a loader is not actually needed.
                this.iterator = handleServiceLoaderUnavailability("proc.no.service",
                                                                  null);
                return;
            }
        }

        // java.util.ServiceLoader.load or sun.misc.Service.providers
        Method loadMethod = loaderClass.getMethod(loadMethodName,
                                                  Class.class,
                                                  ClassLoader.class);

        Object result = loadMethod.invoke(null,
                                          Processor.class,
                                          classLoader);

        // For java.util.ServiceLoader, we have to call another
        // method to get the iterator.
        if (jusl) {
            loader = result; // Store ServiceLoader to call reload later
            Method m = loaderClass.getMethod("iterator");
            result = m.invoke(result); // serviceLoader.iterator();
        }

        // The result should now be an iterator.
        this.iterator = (Iterator<?>) result;
    } catch (Throwable t) {
        log.error("proc.service.problem");
        throw new Abort(t);
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:47,代码来源:JavacProcessingEnvironment.java


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