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


Java TaskListener.started方法代码示例

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


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

示例1: runLastRound

import com.sun.source.util.TaskListener; //导入方法依赖的package包/类
private void runLastRound(PrintWriter xout,
                          int roundNumber,
                          boolean errorStatus,
                          TaskListener taskListener) throws IOException {
    roundNumber++;
    List<ClassSymbol> noTopLevelClasses = List.nil();
    Set<TypeElement> noAnnotations =  Collections.emptySet();
    printRoundInfo(xout, roundNumber, noTopLevelClasses, noAnnotations, true);

    Set<Element> emptyRootElements = Collections.emptySet(); // immutable
    RoundEnvironment renv = new JavacRoundEnvironment(true,
                                                      errorStatus,
                                                      emptyRootElements,
                                                      JavacProcessingEnvironment.this);
    if (taskListener != null)
        taskListener.started(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));

    try {
        discoveredProcs.iterator().runContributingProcs(renv);
    } finally {
        if (taskListener != null)
            taskListener.finished(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:25,代码来源:JavacProcessingEnvironment.java

示例2: run

import com.sun.source.util.TaskListener; //导入方法依赖的package包/类
/** Run a processing round. */
void run(boolean lastRound, boolean errorStatus) {
    printRoundInfo(lastRound);

    TaskListener taskListener = context.get(TaskListener.class);
    if (taskListener != null)
        taskListener.started(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));

    try {
        if (lastRound) {
            filer.setLastRound(true);
            Set<Element> emptyRootElements = Collections.emptySet(); // immutable
            RoundEnvironment renv = new JavacRoundEnvironment(true,
                    errorStatus,
                    emptyRootElements,
                    JavacProcessingEnvironment.this);
            discoveredProcs.iterator().runContributingProcs(renv);
        } else {
            discoverAndRunProcs(context, annotationsPresent, topLevelClasses, packageInfoFiles);
        }
    } finally {
        if (taskListener != null)
            taskListener.finished(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));
    }

    nMessagerErrors = messager.errorCount();
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:28,代码来源:JavacProcessingEnvironment.java

示例3: started

import com.sun.source.util.TaskListener; //导入方法依赖的package包/类
@Override
public void started(TaskEvent e) {
    // guard against listeners being updated by a listener
    TaskListener[] ll = this.listeners;
    for (TaskListener l: ll)
        l.started(e);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:MultiTaskListener.java

示例4: started

import com.sun.source.util.TaskListener; //导入方法依赖的package包/类
@Override @DefinedBy(Api.COMPILER_TREE)
public void started(TaskEvent e) {
    // guard against listeners being updated by a listener
    TaskListener[] ll = this.listeners;
    for (TaskListener l: ll)
        l.started(e);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:MultiTaskListener.java

示例5: runLastRound

import com.sun.source.util.TaskListener; //导入方法依赖的package包/类
private List<JCCompilationUnit> runLastRound(PrintWriter xout,
                                             int roundNumber,
                                             boolean errorStatus,
                                             JavaCompiler compiler,
                                             List<JCCompilationUnit> roots,
                          TaskListener taskListener) throws IOException {
    roundNumber++;
    List<ClassSymbol> noTopLevelClasses = List.nil();
    Set<TypeElement> noAnnotations =  Collections.emptySet();
    printRoundInfo(xout, roundNumber, noTopLevelClasses, noAnnotations, true);

    Set<Element> emptyRootElements = Collections.emptySet(); // immutable
    RoundEnvironment renv = new JavacRoundEnvironment(true,
                                                      errorStatus,
                                                      emptyRootElements,
                                                      JavacProcessingEnvironment.this);
    if (taskListener != null)
        taskListener.started(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));

    try {
        discoveredProcs.iterator().runContributingProcs(renv);
    } finally {
        if (taskListener != null)
            taskListener.finished(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING_ROUND));
    }

    // Add any sources generated during the last round to the set
    // of files to be compiled.
    if (moreToDo()) {
        List<JCCompilationUnit> parsedFiles = sourcesToParsedFiles(compiler);
        roots = cleanTrees(roots).appendList(parsedFiles);
    }

    return roots;
}
 
开发者ID:lucasicf,项目名称:metricgenerator-jdk-compiler,代码行数:36,代码来源:JavacProcessingEnvironment.java

示例6: started

import com.sun.source.util.TaskListener; //导入方法依赖的package包/类
@Override
public void started(TaskEvent e) {
  for (TaskListener listener : listeners) {
    listener.started(e);
  }
}
 
开发者ID:facebook,项目名称:buck,代码行数:7,代码来源:MultiplexingTaskListener.java

示例7: started

import com.sun.source.util.TaskListener; //导入方法依赖的package包/类
@Override
public void started(TaskEvent e) {
    for (TaskListener listener : listeners)
        listener.started(e);
}
 
开发者ID:haitaoyao,项目名称:btrace,代码行数:6,代码来源:Verifier.java


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