KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com4j > tlbimp > Messages


1 package com4j.tlbimp;
2
3 import java.text.MessageFormat JavaDoc;
4 import java.util.ResourceBundle JavaDoc;
5
6 /**
7  * Localization of the messages.
8  *
9  * @author Kohsuke Kawaguchi (kk@kohsuke.org)
10  */

11 enum Messages {
12
13     RETVAL_MUST_BY_REFERENCE,
14     UNSUPPORTED_VARTYPE,
15     UNSUPPORTED_TYPE,
16     FAILED_TO_BIND,
17     INVALID_LIBID,
18     NO_VERSION_AVAILABLE,
19     INVALID_VERSION,
20     NO_WIN32_TYPELIB,
21     ;
22
23     private static final ResourceBundle JavaDoc rb = ResourceBundle.getBundle(Messages.class.getName());
24
25     String JavaDoc format( Object JavaDoc... args ) {
26         return MessageFormat.format( rb.getString(name()), args );
27     }
28
29     public String JavaDoc toString() {
30         return format();
31     }
32 }
33
Popular Tags