mcimadamore@136: /* xdono@229: * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. mcimadamore@136: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@136: * mcimadamore@136: * This code is free software; you can redistribute it and/or modify it mcimadamore@136: * under the terms of the GNU General Public License version 2 only, as mcimadamore@136: * published by the Free Software Foundation. Sun designates this mcimadamore@136: * particular file as subject to the "Classpath" exception as provided mcimadamore@136: * by Sun in the LICENSE file that accompanied this code. mcimadamore@136: * mcimadamore@136: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@136: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@136: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@136: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@136: * accompanied this code). mcimadamore@136: * mcimadamore@136: * You should have received a copy of the GNU General Public License version mcimadamore@136: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@136: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@136: * mcimadamore@136: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, mcimadamore@136: * CA 95054 USA or visit www.sun.com if you need additional information or mcimadamore@136: * have any questions. mcimadamore@136: */ mcimadamore@136: mcimadamore@136: package com.sun.tools.javac.api; mcimadamore@136: mcimadamore@136: import java.util.Locale; mcimadamore@136: import java.util.MissingResourceException; mcimadamore@136: mcimadamore@136: /** mcimadamore@136: * This interface defines the minimum requirements in order to provide support mcimadamore@136: * for localized formatted strings. mcimadamore@136: * mcimadamore@136: * @author Maurizio Cimadamore mcimadamore@136: */ mcimadamore@136: public interface Messages { mcimadamore@136: mcimadamore@136: /** mcimadamore@136: * Add a new resource bundle to the list that is searched for localized messages. mcimadamore@136: * @param bundleName the name to identify the resource bundle of localized messages. mcimadamore@136: * @throws MissingResourceException if the given resource is not found mcimadamore@136: */ mcimadamore@136: void add(String bundleName) throws MissingResourceException; mcimadamore@136: mcimadamore@136: /** mcimadamore@221: * Get a localized formatted string. mcimadamore@136: * @param l locale in which the text is to be localized mcimadamore@136: * @param key locale-independent message key mcimadamore@136: * @param args misc message arguments mcimadamore@136: * @return a localized formatted string mcimadamore@136: */ mcimadamore@136: String getLocalizedString(Locale l, String key, Object... args); mcimadamore@136: }