1 5 6 package javax.xml.bind; 7 8 import javax.xml.namespace.NamespaceContext ; 9 10 74 75 final public class DatatypeConverter { 76 77 private static DatatypeConverterInterface theConverter = new DatatypeConverterImpl(); 79 80 private DatatypeConverter() { 81 } 83 84 101 public static void setDatatypeConverter( DatatypeConverterInterface converter ) { 102 if( converter == null ) { 103 throw new IllegalArgumentException ( 104 Messages.format( Messages.CONVERTER_MUST_NOT_BE_NULL ) ); 105 } else if( theConverter == null ) { 106 theConverter = converter; 107 } 108 } 109 110 119 public static String parseString( String lexicalXSDString ) { 120 return theConverter.parseString( lexicalXSDString ); 121 } 122 123 133 public static java.math.BigInteger parseInteger( String lexicalXSDInteger ) { 134 return theConverter.parseInteger( lexicalXSDInteger ); 135 } 136 137 147 public static int parseInt( String lexicalXSDInt ) { 148 return theConverter.parseInt( lexicalXSDInt ); 149 } 150 151 161 public static long parseLong( String lexicalXSDLong ) { 162 return theConverter.parseLong( lexicalXSDLong ); 163 } 164 165 175 public static short parseShort( String lexicalXSDShort ) { 176 return theConverter.parseShort( lexicalXSDShort ); 177 } 178 179 189 public static java.math.BigDecimal parseDecimal( String lexicalXSDDecimal ) { 190 return theConverter.parseDecimal( lexicalXSDDecimal ); 191 } 192 193 203 public static float parseFloat( String lexicalXSDFloat ) { 204 return theConverter.parseFloat( lexicalXSDFloat ); 205 } 206 207 217 public static double parseDouble( String lexicalXSDDouble ) { 218 return theConverter.parseDouble( lexicalXSDDouble ); 219 } 220 221 231 public static boolean parseBoolean( String lexicalXSDBoolean ) { 232 return theConverter.parseBoolean( lexicalXSDBoolean ); 233 } 234 235 245 public static byte parseByte( String lexicalXSDByte ) { 246 return theConverter.parseByte( lexicalXSDByte ); 247 } 248 249 266 public static javax.xml.namespace.QName parseQName( String lexicalXSDQName, 267 NamespaceContext nsc) { 268 return theConverter.parseQName( lexicalXSDQName, nsc ); 269 } 270 271 281 public static java.util.Calendar parseDateTime( String lexicalXSDDateTime ) { 282 return theConverter.parseDateTime( lexicalXSDDateTime ); 283 } 284 285 295 public static byte[] parseBase64Binary( String lexicalXSDBase64Binary ) { 296 return theConverter.parseBase64Binary( lexicalXSDBase64Binary ); 297 } 298 299 309 public static byte[] parseHexBinary( String lexicalXSDHexBinary ) { 310 return theConverter.parseHexBinary( lexicalXSDHexBinary ); 311 } 312 313 323 public static long parseUnsignedInt( String lexicalXSDUnsignedInt ) { 324 return theConverter.parseUnsignedInt( lexicalXSDUnsignedInt ); 325 } 326 327 337 public static int parseUnsignedShort( String lexicalXSDUnsignedShort ) { 338 return theConverter.parseUnsignedShort( lexicalXSDUnsignedShort ); 339 } 340 341 351 public static java.util.Calendar parseTime( String lexicalXSDTime ) { 352 return theConverter.parseTime( lexicalXSDTime ); 353 } 354 364 public static java.util.Calendar parseDate( String lexicalXSDDate ) { 365 return theConverter.parseDate( lexicalXSDDate ); 366 } 367 368 379 public static String parseAnySimpleType( String lexicalXSDAnySimpleType ) { 380 return theConverter.parseAnySimpleType( lexicalXSDAnySimpleType ); 381 } 382 390 393 public static String printString( String val ) { 394 return theConverter.printString( val ); 395 } 396 397 406 public static String printInteger( java.math.BigInteger val ) { 407 return theConverter.printInteger( val ); 408 } 409 410 418 public static String printInt( int val ) { 419 return theConverter.printInt( val ); 420 } 421 422 430 public static String printLong( long val ) { 431 return theConverter.printLong( val ); 432 } 433 434 442 public static String printShort( short val ) { 443 return theConverter.printShort( val ); 444 } 445 446 455 public static String printDecimal( java.math.BigDecimal val ) { 456 return theConverter.printDecimal( val ); 457 } 458 459 467 public static String printFloat( float val ) { 468 return theConverter.printFloat( val ); 469 } 470 471 479 public static String printDouble( double val ) { 480 return theConverter.printDouble( val ); 481 } 482 483 491 public static String printBoolean( boolean val ) { 492 return theConverter.printBoolean( val ); 493 } 494 495 503 public static String printByte( byte val ) { 504 return theConverter.printByte( val ); 505 } 506 507 519 public static String printQName( javax.xml.namespace.QName val, 520 NamespaceContext nsc ) { 521 return theConverter.printQName( val, nsc ); 522 } 523 524 533 public static String printDateTime( java.util.Calendar val ) { 534 return theConverter.printDateTime( val ); 535 } 536 537 546 public static String printBase64Binary( byte[] val ) { 547 return theConverter.printBase64Binary( val ); 548 } 549 550 559 public static String printHexBinary( byte[] val ) { 560 return theConverter.printHexBinary( val ); 561 } 562 563 571 public static String printUnsignedInt( long val ) { 572 return theConverter.printUnsignedInt( val ); 573 } 574 575 583 public static String printUnsignedShort( int val ) { 584 return theConverter.printUnsignedShort( val ); 585 } 586 587 596 public static String printTime( java.util.Calendar val ) { 597 return theConverter.printTime( val ); 598 } 599 600 609 public static String printDate( java.util.Calendar val ) { 610 return theConverter.printDate( val ); 611 } 612 613 621 public static String printAnySimpleType( String val ) { 622 return theConverter.printAnySimpleType( val ); 623 } 624 } 625 | Popular Tags |