本文整理了Java中com.sun.tools.javac.main.JavaCompiler.shouldStop()
方法的一些代码示例,展示了JavaCompiler.shouldStop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JavaCompiler.shouldStop()
方法的具体详情如下:
包路径:com.sun.tools.javac.main.JavaCompiler
类名称:JavaCompiler
方法名:shouldStop
[英]Policy of how far to continue processing. null means until first error.
[中]继续处理的距离的策略。null表示直到出现第一个错误。
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
protected final <T> List<T> stopIfError(CompileState cs, List<T> list) {
return shouldStop(cs) ? List.<T>nil() : list;
}
代码示例来源:origin: sc.fiji/javac
protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
return shouldStop(cs) ? ListBuffer.<T>lb() : queue;
}
代码示例来源:origin: sc.fiji/javac
protected final <T> List<T> stopIfError(CompileState cs, List<T> list) {
return shouldStop(cs) ? List.<T>nil() : list;
}
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
return shouldStop(cs) ? new ListBuffer<T>() : queue;
}
代码示例来源:origin: konsoletyper/teavm-javac
protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
return shouldStop(cs) ? new ListBuffer<T>() : queue;
}
代码示例来源:origin: konsoletyper/teavm-javac
protected final <T> List<T> stopIfError(CompileState cs, List<T> list) {
return shouldStop(cs) ? List.<T>nil() : list;
}
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
/**
* Enter the symbols found in a list of parse trees if the compilation
* is expected to proceed beyond anno processing into attr.
* As a side-effect, this puts elements on the "todo" list.
* Also stores a list of all top level classes in rootClasses.
*/
public List<JCCompilationUnit> enterTreesIfNeeded(List<JCCompilationUnit> roots) {
if (shouldStop(CompileState.ATTR))
return List.nil();
return enterTrees(roots);
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* Enter the symbols found in a list of parse trees if the compilation
* is expected to proceed beyond anno processing into attr.
* As a side-effect, this puts elements on the "todo" list.
* Also stores a list of all top level classes in rootClasses.
*/
public List<JCCompilationUnit> enterTreesIfNeeded(List<JCCompilationUnit> roots) {
if (shouldStop(CompileState.ATTR))
return List.nil();
return enterTrees(roots);
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* Parses a list of files.
*/
public List<JCCompilationUnit> parseFiles(Iterable<JavaFileObject> fileObjects) {
if (shouldStop(CompileState.PARSE))
return List.nil();
//parse all files
ListBuffer<JCCompilationUnit> trees = new ListBuffer<>();
Set<JavaFileObject> filesSoFar = new HashSet<JavaFileObject>();
for (JavaFileObject fileObject : fileObjects) {
if (!filesSoFar.contains(fileObject)) {
filesSoFar.add(fileObject);
trees.append(parse(fileObject));
}
}
return trees.toList();
}
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
/**
* Parses a list of files.
*/
public List<JCCompilationUnit> parseFiles(Iterable<JavaFileObject> fileObjects) {
if (shouldStop(CompileState.PARSE))
return List.nil();
//parse all files
ListBuffer<JCCompilationUnit> trees = new ListBuffer<>();
Set<JavaFileObject> filesSoFar = new HashSet<JavaFileObject>();
for (JavaFileObject fileObject : fileObjects) {
if (!filesSoFar.contains(fileObject)) {
filesSoFar.add(fileObject);
trees.append(parse(fileObject));
}
}
return trees.toList();
}
代码示例来源:origin: sc.fiji/javac
/**
* Parses a list of files.
*/
public List<JCCompilationUnit> parseFiles(List<JavaFileObject> fileObjects) throws IOException {
if (shouldStop(CompileState.PARSE))
return List.nil();
//parse all files
ListBuffer<JCCompilationUnit> trees = lb();
for (JavaFileObject fileObject : fileObjects)
trees.append(parse(fileObject));
return trees.toList();
}
代码示例来源:origin: konsoletyper/teavm-javac
if (shouldStop(CompileState.FLOW))
return;
compileStates.put(env, CompileState.FLOW);
if (shouldStop(CompileState.FLOW))
return;
代码示例来源:origin: sc.fiji/javac
if (shouldStop(CompileState.FLOW))
return;
compileStates.put(env, CompileState.FLOW);
if (shouldStop(CompileState.FLOW))
return;
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
if (shouldStop(CompileState.FLOW))
return;
compileStates.put(env, CompileState.FLOW);
if (shouldStop(CompileState.FLOW))
return;
代码示例来源:origin: sc.fiji/javac
public void generate(Queue<Pair<Env<AttrContext>, JCClassDecl>> queue, Queue<JavaFileObject> results) {
if (shouldStop(CompileState.GENERATE))
return;
代码示例来源:origin: konsoletyper/teavm-javac
public void generate(Queue<Pair<Env<AttrContext>, JCClassDecl>> queue, Queue<JavaFileObject> results) {
if (shouldStop(CompileState.GENERATE))
return;
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
while (!q.isEmpty() && !shouldStop(CompileState.ATTR)) {
generate(desugar(flow(attribute(q.remove()))));
代码示例来源:origin: sc.fiji/javac
while (!q.isEmpty() && !shouldStop(CompileState.ATTR)) {
generate(desugar(flow(attribute(q.remove()))));
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
try {
attr.attrib(env);
if (errorCount() > 0 && !shouldStop(CompileState.ATTR)) {
代码示例来源:origin: konsoletyper/teavm-javac
try {
attr.attrib(env);
if (errorCount() > 0 && !shouldStop(CompileState.ATTR)) {
内容来源于网络,如有侵权,请联系作者删除!