src/share/classes/com/sun/tools/javac/api/Formattable.java

changeset 161
ddd75a295501
parent 136
8eafba4f61be
child 333
7c2d6da61646
equal deleted inserted replaced
160:a23e1dc02698 161:ddd75a295501
47 /** 47 /**
48 * Retrieve a pretty name of this object's kind 48 * Retrieve a pretty name of this object's kind
49 * @return a string representing the object's kind 49 * @return a string representing the object's kind
50 */ 50 */
51 String getKind(); 51 String getKind();
52
53 static class LocalizedString implements Formattable {
54 String key;
55
56 public LocalizedString(String key) {
57 this.key = key;
58 }
59
60 public String toString(java.util.Locale l, Messages messages) {
61 return messages.getLocalizedString(l, key);
62 }
63 public String getKind() {
64 return "LocalizedString";
65 }
66
67 public String toString() {
68 return key;
69 }
70 }
52 } 71 }

mercurial