Examples of LocalizedMessage


Examples of com.puppycrawl.tools.checkstyle.api.LocalizedMessage

     */
    protected final void logLoadErrorImpl(int aLineNo, int aColumnNo,
                                          String aMsgKey, Object[] aValues)
    {
        if (!mLogLoadErrors) {
            final LocalizedMessage msg = new LocalizedMessage(aLineNo,
                                                    aColumnNo,
                                                    getMessageBundle(),
                                                    aMsgKey,
                                                    aValues,
                                                    getSeverityLevel(),
                                                    getId(),
                                                    this.getClass());
            throw new RuntimeException(msg.getMessage());
        }

        if (!mSuppressLoadErrors) {
            log(aLineNo, aColumnNo, aMsgKey, aValues);
        }
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.LocalizedMessage

        String key = "general.fileNotFound";
        if (!(aEx instanceof FileNotFoundException)) {
            args = new String[] {aEx.getMessage()};
            key = "general.exception";
        }
        final LocalizedMessage message =
            new LocalizedMessage(
                0,
                Defn.CHECKSTYLE_BUNDLE,
                key,
                args,
                getId(),
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.LocalizedMessage

        String key = "general.fileNotFound";
        if (!(aEx instanceof FileNotFoundException)) {
            args = new String[] {aEx.getMessage()};
            key = "general.exception";
        }
        final LocalizedMessage message =
            new LocalizedMessage(
                0,
                Defn.CHECKSTYLE_BUNDLE,
                key,
                args,
                getId(),
View Full Code Here

Examples of com.puppycrawl.tools.checkstyle.api.LocalizedMessage

        }
        catch (final FileNotFoundException fnfe) {
            Utils.getExceptionLogger()
                .debug("FileNotFoundException occured.", fnfe);
            getMessageCollector().add(
                new LocalizedMessage(
                    0,
                    Defn.CHECKSTYLE_BUNDLE,
                    "general.fileNotFound",
                    null,
                    getId(),
                    this.getClass()));
        }
        catch (final IOException ioe) {
            Utils.getExceptionLogger().debug("IOException occured.", ioe);
            getMessageCollector().add(
                new LocalizedMessage(
                    0,
                    Defn.CHECKSTYLE_BUNDLE,
                    "general.exception",
                    new String[] {ioe.getMessage()},
                    getId(),
                    this.getClass()));
        }
        catch (final RecognitionException re) {
            Utils.getExceptionLogger()
                .debug("RecognitionException occured.", re);
            getMessageCollector().add(
                new LocalizedMessage(
                    re.getLine(),
                    re.getColumn(),
                    Defn.CHECKSTYLE_BUNDLE,
                    "general.exception",
                    new String[] {re.getMessage()},
                    getId(),
                    this.getClass()));
        }
        catch (final TokenStreamRecognitionException tre) {
            Utils.getExceptionLogger()
                .debug("TokenStreamRecognitionException occured.", tre);
            final RecognitionException re = tre.recog;
            if (re != null) {
                getMessageCollector().add(
                    new LocalizedMessage(
                        re.getLine(),
                        re.getColumn(),
                        Defn.CHECKSTYLE_BUNDLE,
                        "general.exception",
                        new String[] {re.getMessage()},
                        getId(),
                        this.getClass()));
            }
            else {
                getMessageCollector().add(
                    new LocalizedMessage(
                        0,
                        Defn.CHECKSTYLE_BUNDLE,
                        "general.exception",
                        new String[]
                        {"TokenStreamRecognitionException occured."},
                        getId(),
                        this.getClass()));
            }
        }
        catch (final TokenStreamException te) {
            Utils.getExceptionLogger()
                .debug("TokenStreamException occured.", te);
            getMessageCollector().add(
                new LocalizedMessage(
                    0,
                    Defn.CHECKSTYLE_BUNDLE,
                    "general.exception",
                    new String[] {te.getMessage()},
                    getId(),
                    this.getClass()));
        }
        catch (final Throwable err) {
            Utils.getExceptionLogger().debug("Throwable occured.", err);
            getMessageCollector().add(
                new LocalizedMessage(
                    0,
                    Defn.CHECKSTYLE_BUNDLE,
                    "general.exception",
                    new String[] {"" + err},
                    getId(),
View Full Code Here

Examples of org.apache.commons.i18n.LocalizedMessage

*
*/
public class ResourceBundleExample {
    public static void main(String[] args) {
        ResourceBundleMessageProvider.install("messageBundle");
        LocalizedMessage testMessage = new LocalizedMessage("helloWorld");
        System.out.println(testMessage.getTitle());
        System.out.println(testMessage.getText());
    }
View Full Code Here

Examples of org.apache.logging.log4j.message.LocalizedMessage

        }
    }

    public void l7dlog(final Priority priority, final String key, final Throwable t) {
        if (isEnabledFor(priority)) {
            final Message msg = new LocalizedMessage(bundle, key, null);
            forcedLog(FQCN, priority, msg, t);
        }
    }
View Full Code Here

Examples of org.apache.logging.log4j.message.LocalizedMessage

        }
    }

    public void l7dlog(final Priority priority, final String key, final Object[] params, final Throwable t) {
        if (isEnabledFor(priority)) {
            final Message msg = new LocalizedMessage(bundle, key, params);
            forcedLog(FQCN, priority, msg, t);
        }
    }
View Full Code Here

Examples of org.apache.logging.log4j.message.LocalizedMessage

        }
    }

    public void l7dlog(final Priority priority, final String key, final Throwable t) {
        if (isEnabledFor(priority)) {
            final Message msg = new LocalizedMessage(bundle, key, null);
            forcedLog(FQCN, priority, msg, t);
        }
    }
View Full Code Here

Examples of org.apache.logging.log4j.message.LocalizedMessage

        }
    }

    public void l7dlog(final Priority priority, final String key, final Object[] params, final Throwable t) {
        if (isEnabledFor(priority)) {
            final Message msg = new LocalizedMessage(bundle, key, params);
            forcedLog(FQCN, priority, msg, t);
        }
    }
View Full Code Here

Examples of org.apache.logging.log4j.message.LocalizedMessage

        }
    }

    public void l7dlog(Priority priority, String key, Throwable t) {
        if (isEnabledFor(priority)) {
            Message msg = new LocalizedMessage(bundle, key, null);
            forcedLog(FQCN, priority, msg, t);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.