com.sun.tools.javac.api
Interface Formattable

All Known Implementing Classes:
Formattable.LocalizedString, Kinds.KindName, Token

public interface Formattable

This interface must be implemented by any javac class that has non-trivial formatting needs (e.g. where toString() does not apply because of localization).


Nested Class Summary
static class Formattable.LocalizedString
           
 
Method Summary
 java.lang.String getKind()
          Retrieve a pretty name of this object's kind
 java.lang.String toString(java.util.Locale locale, Messages messages)
          Used to obtain a localized String representing the object accordingly to a given locale
 

Method Detail

toString

java.lang.String toString(java.util.Locale locale,
                          Messages messages)
Used to obtain a localized String representing the object accordingly to a given locale

Parameters:
locale - locale in which the object's representation is to be rendered
messages - messages object used for localization
Returns:
a locale-dependent string representing the object

getKind

java.lang.String getKind()
Retrieve a pretty name of this object's kind

Returns:
a string representing the object's kind