blob: a49ae964a4657c8003ad8baaec7abb7a69050a6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package org.kohsuke.args4j.spi;
import java.text.MessageFormat;
import java.util.ResourceBundle;
/**
* @author Kohsuke Kawaguchi
*/
enum Messages {
ILLEGAL_OPERAND,
ILLEGAL_CHAR,
ILLEGAL_BOOLEAN,
ILLEGAL_METHOD_SIGNATURE,
ILLEGAL_FIELD_SIGNATURE,
ILLEGAL_LIST
;
private static ResourceBundle rb;
public String format( Object... args ) {
synchronized(Messages.class) {
if(rb==null)
rb = ResourceBundle.getBundle(Messages.class.getName());
return MessageFormat.format(rb.getString(name()),args);
}
}
}
|