本文整理汇总了Java中com.sun.source.util.TaskEvent.Kind方法的典型用法代码示例。如果您正苦于以下问题:Java TaskEvent.Kind方法的具体用法?Java TaskEvent.Kind怎么用?Java TaskEvent.Kind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.source.util.TaskEvent
的用法示例。
在下文中一共展示了TaskEvent.Kind方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: finished
import com.sun.source.util.TaskEvent; //导入方法依赖的package包/类
@Override
public void finished(TaskEvent e) {
final TaskEvent.Kind kind = e.getKind();
if (kind == TaskEvent.Kind.PARSE) {
final CompilationUnitTree compilationUnit = e.getCompilationUnit();
compilationUnits.add(compilationUnit);
} else if (kind == TaskEvent.Kind.ENTER) {
enterDepth -= 1;
// We wait until we've received all enter events so that the validation time shows up
// separately from compiler enter time in the traces. We wait until after annotation
// processing so we catch all the types.
if (!annotationProcessing && enterDepth == 0 && !errorsExist.get()) {
getValidator().validate(compilationUnits);
}
} else if (kind == TaskEvent.Kind.ANNOTATION_PROCESSING) {
annotationProcessing = false;
}
}
示例2: finished
import com.sun.source.util.TaskEvent; //导入方法依赖的package包/类
/**
* Kicks off the scan if we've just finished the analyze phase
* @param e event
*/
@Override
public void finished(TaskEvent e) {
TaskEvent.Kind kind = e.getKind();
if (kind == TaskEvent.Kind.ANALYZE) {
// visit all of the classes to see if their method params are explicitly or effectively final
CompilationUnitTree compilationUnit = e.getCompilationUnit();
visitor.scan(compilationUnit, null);
}
}
示例3: inc
import com.sun.source.util.TaskEvent; //导入方法依赖的package包/类
void inc(TaskEvent.Kind k, boolean started) {
Count c = get(k);
if (c == null)
put(k, c = new Count());
if (started)
c.started++;
else
c.finished++;
}
示例4: started
import com.sun.source.util.TaskEvent; //导入方法依赖的package包/类
@Override
public void started(TaskEvent e) {
final TaskEvent.Kind kind = e.getKind();
if (kind == TaskEvent.Kind.ENTER) {
enterDepth += 1;
} else if (kind == TaskEvent.Kind.ANNOTATION_PROCESSING) {
annotationProcessing = true;
}
}
示例5: EventKindCounter
import com.sun.source.util.TaskEvent; //导入方法依赖的package包/类
EventKindCounter() {
super(TaskEvent.Kind.class);
}
示例6: getKind
import com.sun.source.util.TaskEvent; //导入方法依赖的package包/类
TaskEvent.Kind getKind(String s) {
return TaskEvent.Kind.valueOf(s.toUpperCase());
}
示例7: mirrorKind
import com.sun.source.util.TaskEvent; //导入方法依赖的package包/类
private TaskEventMirror.Kind mirrorKind(TaskEvent.Kind kind) {
return TaskEventMirror.Kind.valueOf(kind.name());
}