1 package com4j.tlbimp; 2 3 import java.text.MessageFormat ; 4 import java.util.ResourceBundle ; 5 6 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 rb = ResourceBundle.getBundle(Messages.class.getName()); 24 25 String format( Object ... args ) { 26 return MessageFormat.format( rb.getString(name()), args ); 27 } 28 29 public String toString() { 30 return format(); 31 } 32 } 33 | Popular Tags |