equal
deleted
inserted
replaced
23 * have any questions. |
23 * have any questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.tools.javac.parser; |
26 package com.sun.tools.javac.parser; |
27 |
27 |
28 import java.util.ResourceBundle; |
28 import java.util.Locale; |
29 |
29 |
30 import com.sun.tools.javac.api.Formattable; |
30 import com.sun.tools.javac.api.Formattable; |
|
31 import com.sun.tools.javac.api.Messages; |
31 |
32 |
32 /** An interface that defines codes for Java source tokens |
33 /** An interface that defines codes for Java source tokens |
33 * returned from lexical analysis. |
34 * returned from lexical analysis. |
34 * |
35 * |
35 * <p><b>This is NOT part of any API supported by Sun Microsystems. If |
36 * <p><b>This is NOT part of any API supported by Sun Microsystems. If |
189 |
190 |
190 public String getKind() { |
191 public String getKind() { |
191 return "Token"; |
192 return "Token"; |
192 } |
193 } |
193 |
194 |
194 public String toString(ResourceBundle bundle) { |
195 public String toString(Locale locale, Messages messages) { |
195 String s = toString(); |
196 return name != null ? toString() : messages.getLocalizedString(locale, "compiler.misc." + toString()); |
196 return s.startsWith("token.") ? bundle.getString("compiler.misc." + s) : s; |
|
197 } |
197 } |
198 } |
198 } |