本文整理汇总了Java中com.sun.tools.javac.util.JCDiagnostic.isFlagSet方法的典型用法代码示例。如果您正苦于以下问题:Java JCDiagnostic.isFlagSet方法的具体用法?Java JCDiagnostic.isFlagSet怎么用?Java JCDiagnostic.isFlagSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.javac.util.JCDiagnostic
的用法示例。
在下文中一共展示了JCDiagnostic.isFlagSet方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unrecoverableError
import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
/** Return whether or not an unrecoverable error has occurred. */
boolean unrecoverableError() {
if (messager.errorRaised())
return true;
for (JCDiagnostic d: log.deferredDiagnostics) {
switch (d.getKind()) {
case WARNING:
if (werror)
return true;
break;
case ERROR:
if (fatalErrors || !d.isFlagSet(RECOVERABLE))
return true;
break;
}
}
return false;
}
示例2: unrecoverableError
import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
/** Return whether or not an unrecoverable error has occurred. */
boolean unrecoverableError() {
if (messager.errorRaised())
return true;
for (JCDiagnostic d: deferredDiagnosticHandler.getDiagnostics()) {
switch (d.getKind()) {
case WARNING:
if (werror)
return true;
break;
case ERROR:
if (fatalErrors || !d.isFlagSet(RECOVERABLE))
return true;
break;
}
}
return false;
}
示例3: isSyntaxError
import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
public static boolean isSyntaxError(Diagnostic<?> d) {
JCDiagnostic jcd = getJCDiagnostic(d);
if (jcd == null) {
return false;
}
return jcd.isFlagSet(DiagnosticFlag.SYNTAX);
}
示例4: unrecoverableError
import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
private boolean unrecoverableError() {
for (JCDiagnostic d : log.deferredDiagnostics) {
if (d.getKind() == JCDiagnostic.Kind.ERROR && !d.isFlagSet(RECOVERABLE))
return true;
}
return false;
}
示例5: unrecoverableError
import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
private boolean unrecoverableError() {
for (JCDiagnostic d : log.deferredDiagnostics) {
if (d.getKind() == JCDiagnostic.Kind.ERROR
&& !d.isFlagSet(RECOVERABLE))
return true;
}
return false;
}
示例6: isResolveError
import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
private static boolean isResolveError(JCDiagnostic d) {
return d.isFlagSet(RESOLVE_ERROR);
}