Package com.sun.tools.javac.util

Examples of com.sun.tools.javac.util.JavacMessages


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


    @Override
    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
        Context context = ((JavacProcessingEnvironment) processingEnv).getContext();
        Locale locale = context.get(Locale.class);
        JavacMessages messages = context.get(JavacMessages.messagesKey);

        round++;
        if (round == 1) {
            initialLocale = locale;
            initialMessages = messages;
View Full Code Here

    public static String getLocalizedString(String key, Object... args) { // FIXME
                                                                          // sb
                                                                          // private
        try {
            if (messages == null)
                messages = new JavacMessages(javacBundleName);
            return messages.getLocalizedString("javac." + key, args);
        } catch (MissingResourceException e) {
            throw new Error("Fatal Error: Resource for javac is missing", e);
        }
    }
View Full Code Here

        }
    }

    public static void useRawMessages(boolean enable) {
        if (enable) {
            messages = new JavacMessages(javacBundleName) {
                @Override
                public String getLocalizedString(String key, Object... args) {
                    return key;
                }
            };
        } else {
            messages = new JavacMessages(javacBundleName);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.util.JavacMessages

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.