1 5 6 package javax.xml.bind; 7 8 import java.text.MessageFormat ; 9 import java.util.ResourceBundle ; 10 11 14 class Messages 15 { 16 static String format( String property ) { 17 return format( property, null ); 18 } 19 20 static String format( String property, Object arg1 ) { 21 return format( property, new Object []{arg1} ); 22 } 23 24 static String format( String property, Object arg1, Object arg2 ) { 25 return format( property, new Object []{arg1,arg2} ); 26 } 27 28 static String format( String property, Object arg1, Object arg2, Object arg3 ) { 29 return format( property, new Object []{arg1,arg2,arg3} ); 30 } 31 32 34 35 static String format( String property, Object [] args ) { 36 String text = ResourceBundle.getBundle(Messages.class.getName()).getString(property); 37 return MessageFormat.format(text,args); 38 } 39 40 static final String PROVIDER_NOT_FOUND = "ContextFinder.ProviderNotFound"; 47 48 static final String COULD_NOT_INSTANTIATE = "ContextFinder.CouldNotInstantiate"; 50 51 static final String CANT_FIND_PROPERTIES_FILE = "ContextFinder.CantFindPropertiesFile"; 53 54 static final String CANT_MIX_PROVIDERS = "ContextFinder.CantMixProviders"; 56 57 static final String MISSING_PROPERTY = "ContextFinder.MissingProperty"; 59 60 static final String NO_PACKAGE_IN_CONTEXTPATH = "ContextFinder.NoPackageInContextPath"; 62 63 static final String NAME_VALUE = "PropertyException.NameValue"; 65 66 static final String CONVERTER_MUST_NOT_BE_NULL = "DatatypeConverter.ConverterMustNotBeNull"; 68 69 static final String ILLEGAL_CAST = "JAXBContext.IllegalCast"; 71 } 72 | Popular Tags |