本文整理汇总了Java中com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition类的典型用法代码示例。如果您正苦于以下问题:Java SimpleDiagnosticPosition类的具体用法?Java SimpleDiagnosticPosition怎么用?Java SimpleDiagnosticPosition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SimpleDiagnosticPosition类属于com.sun.tools.javac.util.JCDiagnostic包,在下文中一共展示了SimpleDiagnosticPosition类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: wrap
import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; //导入依赖的package包/类
private DiagnosticPosition wrap(int pos) {
return (pos == Position.NOPOS ? null : new SimpleDiagnosticPosition(pos));
}
示例2: pos
import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; //导入依赖的package包/类
public JCDiagnostic.DiagnosticPosition pos(DCDocComment dc) {
return new SimpleDiagnosticPosition(dc.comment.getSourcePos(pos));
}
示例3: aptError
import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; //导入依赖的package包/类
/** Report an error, unless another error was already reported at same
* source position.
* @param pos The source position at which to report the error.
* @param key The key for the localized error message.
* @param args Fields of the error message.
*/
public void aptError(int pos, String key, Object ... args) {
report(aptDiags.error(source, new SimpleDiagnosticPosition(pos), key, args));
}
示例4: aptWarning
import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; //导入依赖的package包/类
/** Report a warning, unless suppressed by the -nowarn option or the
* maximum number of warnings has been reached.
* @param pos The source position at which to report the warning.
* @param key The key for the localized warning message.
* @param args Fields of the warning message.
*/
public void aptWarning(int pos, String key, Object ... args) {
report(aptDiags.warning(source, new SimpleDiagnosticPosition(pos), key, args));
}
示例5: aptNote
import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition; //导入依赖的package包/类
/** Report a note, unless suppressed by the -nowarn option.
* @param pos The source position at which to report the note.
* @param key The key for the localized note message.
* @param args Fields of the note message.
*/
public void aptNote(int pos, String key, Object ... args) {
report(aptDiags.note(source, new SimpleDiagnosticPosition(pos), key, args));
}