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


Java JCDiagnostic.Factory方法代码示例

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


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

示例1: Messager

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
/**
 * Constructor
 * @param programName  Name of the program (for error messages).
 * @param errWriter    Stream for error messages
 * @param warnWriter   Stream for warnings
 * @param noticeWriter Stream for other messages
 */
@SuppressWarnings("deprecation")
protected Messager(Context context,
                   String programName,
                   PrintWriter errWriter,
                   PrintWriter warnWriter,
                   PrintWriter noticeWriter) {
    super(context, errWriter, warnWriter, noticeWriter);
    messages = JavacMessages.instance(context);
    messages.add("com.sun.tools.javadoc.resources.javadoc");
    javadocDiags = new JCDiagnostic.Factory(messages, "javadoc");
    this.programName = programName;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:Messager.java

示例2: Messager

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
/**
 * Constructor
 * @param programName  Name of the program (for error messages).
 * @param outWriter    Stream for notices etc.
 * @param errWriter    Stream for errors and warnings
 */
@SuppressWarnings("deprecation")
public Messager(Context context, String programName, PrintWriter outWriter, PrintWriter errWriter) {
    super(context, errWriter, errWriter, outWriter);
    messages = JavacMessages.instance(context);
    messages.add(locale -> ResourceBundle.getBundle("jdk.javadoc.internal.tool.resources.javadoc",
                                                     locale));
    javadocDiags = new JCDiagnostic.Factory(messages, "javadoc");
    this.programName = programName;
    this.context = context;
    locale = Locale.getDefault();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:Messager.java

示例3: Messager

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
/**
 * Constructor
 * @param programName  Name of the program (for error messages).
 * @param errWriter    Stream for error messages
 * @param warnWriter   Stream for warnings
 * @param noticeWriter Stream for other messages
 */
@SuppressWarnings("deprecation")
protected Messager(Context context,
                   String programName,
                   PrintWriter errWriter,
                   PrintWriter warnWriter,
                   PrintWriter noticeWriter) {
    super(context, errWriter, warnWriter, noticeWriter);
    messages = JavacMessages.instance(context);
    messages.add(locale -> ResourceBundle.getBundle("com.sun.tools.javadoc.resources.javadoc",
                                                     locale));
    javadocDiags = new JCDiagnostic.Factory(messages, "javadoc");
    this.programName = programName;

}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:Messager.java

示例4: Bark

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
/**
 * Creates a Bark.
 */
protected Bark(Context context) {
    super(context); // will register this object in context with Log.logKey
    context.put(barkKey, this);

    // register additional resource bundle for APT messages.
    Messages aptMessages = new Messages(Messages.getDefaultBundle());
    aptMessages.add("com.sun.tools.apt.resources.apt");
    aptDiags = new JCDiagnostic.Factory(aptMessages, "apt");

    multipleErrors = true;
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:15,代码来源:Bark.java

示例5: Bark

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
/**
 * Creates a Bark.
 */
protected Bark(Context context) {
    super(context); // will register this object in context with Log.logKey
    context.put(barkKey, this);

    // register additional resource bundle for APT messages.
    JavacMessages aptMessages = JavacMessages.instance(context);
    aptMessages.add("com.sun.tools.apt.resources.apt");
    aptDiags = new JCDiagnostic.Factory(aptMessages, "apt");

    multipleErrors = true;
}
 
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:15,代码来源:Bark.java

示例6: InferenceException

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
InferenceException(JCDiagnostic.Factory diags) {
    super(diags);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:4,代码来源:Infer.java

示例7: NoInstanceException

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
NoInstanceException(boolean isAmbiguous, JCDiagnostic.Factory diags) {
    super(diags);
    this.isAmbiguous = isAmbiguous;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:5,代码来源:Infer.java

示例8: InvalidInstanceException

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
InvalidInstanceException(JCDiagnostic.Factory diags) {
    super(diags);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:4,代码来源:Infer.java

示例9: DCErroneous

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
DCErroneous(String body, JCDiagnostic.Factory diags, DiagnosticSource diagSource, String code, Object... args) {
    this.body = body;
    this.diag = diags.error(diagSource, this, code, args);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:DCTree.java

示例10: DCErroneous

import com.sun.tools.javac.util.JCDiagnostic; //导入方法依赖的package包/类
DCErroneous(String body, JCDiagnostic.Factory diags, DiagnosticSource diagSource, String code, Object... args) {
    this.body = body;
    this.diag = diags.error(null, diagSource, this, code, args);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:DCTree.java


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