Thu, 24 Jul 2008 19:06:57 +0100
6717241: some diagnostic argument is prematurely converted into a String object
Summary: removed early toString() conversions applied to diagnostic arguments
Reviewed-by: jjg
mcimadamore@80 | 1 | /* |
mcimadamore@80 | 2 | * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. |
mcimadamore@80 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
mcimadamore@80 | 4 | * |
mcimadamore@80 | 5 | * This code is free software; you can redistribute it and/or modify it |
mcimadamore@80 | 6 | * under the terms of the GNU General Public License version 2 only, as |
mcimadamore@80 | 7 | * published by the Free Software Foundation. Sun designates this |
mcimadamore@80 | 8 | * particular file as subject to the "Classpath" exception as provided |
mcimadamore@80 | 9 | * by Sun in the LICENSE file that accompanied this code. |
mcimadamore@80 | 10 | * |
mcimadamore@80 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
mcimadamore@80 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
mcimadamore@80 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
mcimadamore@80 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
mcimadamore@80 | 15 | * accompanied this code). |
mcimadamore@80 | 16 | * |
mcimadamore@80 | 17 | * You should have received a copy of the GNU General Public License version |
mcimadamore@80 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
mcimadamore@80 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
mcimadamore@80 | 20 | * |
mcimadamore@80 | 21 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
mcimadamore@80 | 22 | * CA 95054 USA or visit www.sun.com if you need additional information or |
mcimadamore@80 | 23 | * have any questions. |
mcimadamore@80 | 24 | */ |
mcimadamore@80 | 25 | |
mcimadamore@80 | 26 | package com.sun.tools.javac.api; |
mcimadamore@80 | 27 | |
mcimadamore@80 | 28 | import java.util.ResourceBundle; |
mcimadamore@80 | 29 | |
mcimadamore@80 | 30 | /** |
mcimadamore@80 | 31 | * This interface must be implemented by any javac class that has non-trivial |
mcimadamore@80 | 32 | * formatting needs (e.g. where toString() does not apply because of localization). |
mcimadamore@80 | 33 | * |
mcimadamore@80 | 34 | * @author Maurizio Cimadamore |
mcimadamore@80 | 35 | */ |
mcimadamore@80 | 36 | public interface Formattable { |
mcimadamore@80 | 37 | |
mcimadamore@80 | 38 | /** |
mcimadamore@80 | 39 | * Used to obtain a localized String representing the object accordingly |
mcimadamore@80 | 40 | * to a given locale |
mcimadamore@80 | 41 | * |
mcimadamore@80 | 42 | * @param bundle resource bundle class used for localization |
mcimadamore@80 | 43 | * @return a locale-dependent string representing the object |
mcimadamore@80 | 44 | */ |
mcimadamore@80 | 45 | public String toString(ResourceBundle bundle); |
mcimadamore@80 | 46 | /** |
mcimadamore@80 | 47 | * Retrieve a pretty name of this object's kind |
mcimadamore@80 | 48 | * @return a string representing the object's kind |
mcimadamore@80 | 49 | */ |
mcimadamore@80 | 50 | String getKind(); |
mcimadamore@80 | 51 | } |