Package com.sun.tools.javac.util.JCDiagnostic

Examples of com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition


            } else if (result.isMalformed() || result.isUnmappable()) {
                // bad character in input

                // report coding error (warn only pre 1.5)
                if (!getSource().allowEncodingErrors()) {
                    log.error(new SimpleDiagnosticPosition(dest.limit()),
                              "illegal.char.for.encoding",
                              charset == null ? encodingName : charset.name());
                } else {
                    log.warning(new SimpleDiagnosticPosition(dest.limit()),
                                "illegal.char.for.encoding",
                                charset == null ? encodingName : charset.name());
                }

                // skip past the coding error
View Full Code Here


    public long getSourcePosition(DCDocComment dc) {
        return dc.comment.getSourcePos(pos);
    }

    public JCDiagnostic.DiagnosticPosition pos(DCDocComment dc) {
        return new SimpleDiagnosticPosition(dc.comment.getSourcePos(pos));
    }
View Full Code Here

            } else if (result.isMalformed() || result.isUnmappable()) {
                // bad character in input

                // report coding error (warn only pre 1.5)
                if (!getSource().allowEncodingErrors()) {
                    log.error(new SimpleDiagnosticPosition(dest.limit()),
                              "illegal.char.for.encoding",
                              charset == null ? encodingName : charset.name());
                } else {
                    log.warning(new SimpleDiagnosticPosition(dest.limit()),
                                "illegal.char.for.encoding",
                                charset == null ? encodingName : charset.name());
                }

                // skip past the coding error
View Full Code Here

    protected abstract void report(JCDiagnostic diagnostic);

    protected abstract void directError(String key, Object... args);

    private DiagnosticPosition wrap(int pos) {
        return (pos == Position.NOPOS ? null : new SimpleDiagnosticPosition(pos));
    }
View Full Code Here

                    }
                };
    }

    private DiagnosticPosition wrap(int pos) {
        return (pos == Position.NOPOS ? null : new SimpleDiagnosticPosition(pos));
    }
View Full Code Here

     @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));
    }
View Full Code Here

     @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));
    }
View Full Code Here

     @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));
    }
View Full Code Here

                    }
                };
    }

    private DiagnosticPosition wrap(int pos) {
        return (pos == Position.NOPOS ? null : new SimpleDiagnosticPosition(pos));
    }
View Full Code Here

                    }
                };
    }

    private DiagnosticPosition wrap(int pos) {
        return (pos == Position.NOPOS ? null : new SimpleDiagnosticPosition(pos));
    }
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.