Java Code Examples for com.sun.tools.javac.util.JCDiagnostic.DiagnosticType#toString()

The following examples show how to use com.sun.tools.javac.util.JCDiagnostic.DiagnosticType#toString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Messager.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 2
Source File: Messager.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 3
Source File: Messager.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 4
Source File: Messager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 5
Source File: Messager.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, String pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 6
Source File: Messager.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 7
Source File: Messager.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 8
Source File: Messager.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}
 
Example 9
Source File: Messager.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void report(DiagnosticType type, SourcePosition pos, String msg) {
    switch (type) {
        case ERROR:
        case WARNING:
            Object prefix = (pos == null) ? programName : pos;
            report(javadocDiags.create(type, null, null, "msg", prefix, msg));
            break;

        case NOTE:
            String key = (pos == null) ? "msg" : "pos.msg";
            report(javadocDiags.create(type, null, null, key, pos, msg));
            break;

        default:
            throw new IllegalArgumentException(type.toString());
    }
}