1 5 6 package javax.xml.bind.helpers; 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 INPUTSTREAM_NOT_NULL = "AbstractUnmarshallerImpl.ISNotNull"; 47 48 static final String MUST_BE_BOOLEAN = "AbstractMarshallerImpl.MustBeBoolean"; 50 51 static final String MUST_BE_STRING = "AbstractMarshallerImpl.MustBeString"; 53 54 static final String SEVERITY_MESSAGE = "DefaultValidationEventHandler.SeverityMessage"; 56 57 static final String LOCATION_UNAVAILABLE = "DefaultValidationEventHandler.LocationUnavailable"; 59 60 static final String UNRECOGNIZED_SEVERITY = "DefaultValidationEventHandler.UnrecognizedSeverity"; 62 63 static final String WARNING = "DefaultValidationEventHandler.Warning"; 65 66 static final String ERROR = "DefaultValidationEventHandler.Error"; 68 69 static final String FATAL_ERROR = "DefaultValidationEventHandler.FatalError"; 71 72 static final String ILLEGAL_SEVERITY = "ValidationEventImpl.IllegalSeverity"; 74 75 static final String MUST_NOT_BE_NULL = "Shared.MustNotBeNull"; 77 } 78 | Popular Tags |