1 package org.python.core; 2 3 6 7 public class PyUnicode extends PyString { 8 public static final Class exposed_base=PyBaseString.class; 9 10 12 13 14 public static final String exposed_name="unicode"; 15 16 public static void typeSetup(PyObject dict,PyType.Newstyle marker) { 17 class exposed___ne__ extends PyBuiltinFunctionNarrow { 18 19 private PyUnicode self; 20 21 public PyObject getSelf() { 22 return self; 23 } 24 25 exposed___ne__(PyUnicode self,PyBuiltinFunction.Info info) { 26 super(info); 27 this.self=self; 28 } 29 30 public PyBuiltinFunction makeBound(PyObject self) { 31 return new exposed___ne__((PyUnicode)self,info); 32 } 33 34 public PyObject __call__(PyObject arg0) { 35 PyObject ret=self.unicode___ne__(arg0); 36 if (ret==null) 37 return Py.NotImplemented; 38 return ret; 39 } 40 41 public PyObject inst_call(PyObject gself,PyObject arg0) { 42 PyUnicode self=(PyUnicode)gself; 43 PyObject ret=self.unicode___ne__(arg0); 44 if (ret==null) 45 return Py.NotImplemented; 46 return ret; 47 } 48 49 } 50 dict.__setitem__("__ne__",new PyMethodDescr("__ne__",PyUnicode.class,1,1,new exposed___ne__(null,null))); 51 class exposed___eq__ extends PyBuiltinFunctionNarrow { 52 53 private PyUnicode self; 54 55 public PyObject getSelf() { 56 return self; 57 } 58 59 exposed___eq__(PyUnicode self,PyBuiltinFunction.Info info) { 60 super(info); 61 this.self=self; 62 } 63 64 public PyBuiltinFunction makeBound(PyObject self) { 65 return new exposed___eq__((PyUnicode)self,info); 66 } 67 68 public PyObject __call__(PyObject arg0) { 69 PyObject ret=self.unicode___eq__(arg0); 70 if (ret==null) 71 return Py.NotImplemented; 72 return ret; 73 } 74 75 public PyObject inst_call(PyObject gself,PyObject arg0) { 76 PyUnicode self=(PyUnicode)gself; 77 PyObject ret=self.unicode___eq__(arg0); 78 if (ret==null) 79 return Py.NotImplemented; 80 return ret; 81 } 82 83 } 84 dict.__setitem__("__eq__",new PyMethodDescr("__eq__",PyUnicode.class,1,1,new exposed___eq__(null,null))); 85 class exposed___contains__ extends PyBuiltinFunctionNarrow { 86 87 private PyUnicode self; 88 89 public PyObject getSelf() { 90 return self; 91 } 92 93 exposed___contains__(PyUnicode self,PyBuiltinFunction.Info info) { 94 super(info); 95 this.self=self; 96 } 97 98 public PyBuiltinFunction makeBound(PyObject self) { 99 return new exposed___contains__((PyUnicode)self,info); 100 } 101 102 public PyObject __call__(PyObject arg0) { 103 return Py.newBoolean(self.unicode___contains__(arg0)); 104 } 105 106 public PyObject inst_call(PyObject gself,PyObject arg0) { 107 PyUnicode self=(PyUnicode)gself; 108 return Py.newBoolean(self.unicode___contains__(arg0)); 109 } 110 111 } 112 dict.__setitem__("__contains__",new PyMethodDescr("__contains__",PyUnicode.class,1,1,new exposed___contains__(null,null))); 113 class exposed___len__ extends PyBuiltinFunctionNarrow { 114 115 private PyUnicode self; 116 117 public PyObject getSelf() { 118 return self; 119 } 120 121 exposed___len__(PyUnicode self,PyBuiltinFunction.Info info) { 122 super(info); 123 this.self=self; 124 } 125 126 public PyBuiltinFunction makeBound(PyObject self) { 127 return new exposed___len__((PyUnicode)self,info); 128 } 129 130 public PyObject __call__() { 131 return Py.newInteger(self.unicode___len__()); 132 } 133 134 public PyObject inst_call(PyObject gself) { 135 PyUnicode self=(PyUnicode)gself; 136 return Py.newInteger(self.unicode___len__()); 137 } 138 139 } 140 dict.__setitem__("__len__",new PyMethodDescr("__len__",PyUnicode.class,0,0,new exposed___len__(null,null))); 141 class exposed___add__ extends PyBuiltinFunctionNarrow { 142 143 private PyUnicode self; 144 145 public PyObject getSelf() { 146 return self; 147 } 148 149 exposed___add__(PyUnicode self,PyBuiltinFunction.Info info) { 150 super(info); 151 this.self=self; 152 } 153 154 public PyBuiltinFunction makeBound(PyObject self) { 155 return new exposed___add__((PyUnicode)self,info); 156 } 157 158 public PyObject __call__(PyObject arg0) { 159 return self.unicode___add__(arg0); 160 } 161 162 public PyObject inst_call(PyObject gself,PyObject arg0) { 163 PyUnicode self=(PyUnicode)gself; 164 return self.unicode___add__(arg0); 165 } 166 167 } 168 dict.__setitem__("__add__",new PyMethodDescr("__add__",PyUnicode.class,1,1,new exposed___add__(null,null))); 169 class exposed___mul__ extends PyBuiltinFunctionNarrow { 170 171 private PyUnicode self; 172 173 public PyObject getSelf() { 174 return self; 175 } 176 177 exposed___mul__(PyUnicode self,PyBuiltinFunction.Info info) { 178 super(info); 179 this.self=self; 180 } 181 182 public PyBuiltinFunction makeBound(PyObject self) { 183 return new exposed___mul__((PyUnicode)self,info); 184 } 185 186 public PyObject __call__(PyObject arg0) { 187 return self.unicode___mul__(arg0); 188 } 189 190 public PyObject inst_call(PyObject gself,PyObject arg0) { 191 PyUnicode self=(PyUnicode)gself; 192 return self.unicode___mul__(arg0); 193 } 194 195 } 196 dict.__setitem__("__mul__",new PyMethodDescr("__mul__",PyUnicode.class,1,1,new exposed___mul__(null,null))); 197 class exposed___rmul__ extends PyBuiltinFunctionNarrow { 198 199 private PyUnicode self; 200 201 public PyObject getSelf() { 202 return self; 203 } 204 205 exposed___rmul__(PyUnicode self,PyBuiltinFunction.Info info) { 206 super(info); 207 this.self=self; 208 } 209 210 public PyBuiltinFunction makeBound(PyObject self) { 211 return new exposed___rmul__((PyUnicode)self,info); 212 } 213 214 public PyObject __call__(PyObject arg0) { 215 return self.unicode___rmul__(arg0); 216 } 217 218 public PyObject inst_call(PyObject gself,PyObject arg0) { 219 PyUnicode self=(PyUnicode)gself; 220 return self.unicode___rmul__(arg0); 221 } 222 223 } 224 dict.__setitem__("__rmul__",new PyMethodDescr("__rmul__",PyUnicode.class,1,1,new exposed___rmul__(null,null))); 225 class exposed___hash__ extends PyBuiltinFunctionNarrow { 226 227 private PyUnicode self; 228 229 public PyObject getSelf() { 230 return self; 231 } 232 233 exposed___hash__(PyUnicode self,PyBuiltinFunction.Info info) { 234 super(info); 235 this.self=self; 236 } 237 238 public PyBuiltinFunction makeBound(PyObject self) { 239 return new exposed___hash__((PyUnicode)self,info); 240 } 241 242 public PyObject __call__() { 243 return Py.newInteger(self.unicode_hashCode()); 244 } 245 246 public PyObject inst_call(PyObject gself) { 247 PyUnicode self=(PyUnicode)gself; 248 return Py.newInteger(self.unicode_hashCode()); 249 } 250 251 } 252 dict.__setitem__("__hash__",new PyMethodDescr("__hash__",PyUnicode.class,0,0,new exposed___hash__(null,null))); 253 class exposed___repr__ extends PyBuiltinFunctionNarrow { 254 255 private PyUnicode self; 256 257 public PyObject getSelf() { 258 return self; 259 } 260 261 exposed___repr__(PyUnicode self,PyBuiltinFunction.Info info) { 262 super(info); 263 this.self=self; 264 } 265 266 public PyBuiltinFunction makeBound(PyObject self) { 267 return new exposed___repr__((PyUnicode)self,info); 268 } 269 270 public PyObject __call__() { 271 return new PyString(self.unicode_toString()); 272 } 273 274 public PyObject inst_call(PyObject gself) { 275 PyUnicode self=(PyUnicode)gself; 276 return new PyString(self.unicode_toString()); 277 } 278 279 } 280 dict.__setitem__("__repr__",new PyMethodDescr("__repr__",PyUnicode.class,0,0,new exposed___repr__(null,null))); 281 class exposed_capitalize extends PyBuiltinFunctionNarrow { 282 283 private PyUnicode self; 284 285 public PyObject getSelf() { 286 return self; 287 } 288 289 exposed_capitalize(PyUnicode self,PyBuiltinFunction.Info info) { 290 super(info); 291 this.self=self; 292 } 293 294 public PyBuiltinFunction makeBound(PyObject self) { 295 return new exposed_capitalize((PyUnicode)self,info); 296 } 297 298 public PyObject __call__() { 299 return new PyString(self.unicode_capitalize()); 300 } 301 302 public PyObject inst_call(PyObject gself) { 303 PyUnicode self=(PyUnicode)gself; 304 return new PyString(self.unicode_capitalize()); 305 } 306 307 } 308 dict.__setitem__("capitalize",new PyMethodDescr("capitalize",PyUnicode.class,0,0,new exposed_capitalize(null,null))); 309 class exposed_center extends PyBuiltinFunctionNarrow { 310 311 private PyUnicode self; 312 313 public PyObject getSelf() { 314 return self; 315 } 316 317 exposed_center(PyUnicode self,PyBuiltinFunction.Info info) { 318 super(info); 319 this.self=self; 320 } 321 322 public PyBuiltinFunction makeBound(PyObject self) { 323 return new exposed_center((PyUnicode)self,info); 324 } 325 326 public PyObject __call__(PyObject arg0) { 327 try { 328 return new PyString(self.unicode_center(arg0.asInt(0))); 329 } catch (PyObject.ConversionException e) { 330 String msg; 331 switch (e.index) { 332 case 0: 333 msg="expected an integer"; 334 break; 335 default: 336 msg="xxx"; 337 } 338 throw Py.TypeError(msg); 339 } 340 } 341 342 public PyObject inst_call(PyObject gself,PyObject arg0) { 343 PyUnicode self=(PyUnicode)gself; 344 try { 345 return new PyString(self.unicode_center(arg0.asInt(0))); 346 } catch (PyObject.ConversionException e) { 347 String msg; 348 switch (e.index) { 349 case 0: 350 msg="expected an integer"; 351 break; 352 default: 353 msg="xxx"; 354 } 355 throw Py.TypeError(msg); 356 } 357 } 358 359 } 360 dict.__setitem__("center",new PyMethodDescr("center",PyUnicode.class,1,1,new exposed_center(null,null))); 361 class exposed_count extends PyBuiltinFunctionNarrow { 362 363 private PyUnicode self; 364 365 public PyObject getSelf() { 366 return self; 367 } 368 369 exposed_count(PyUnicode self,PyBuiltinFunction.Info info) { 370 super(info); 371 this.self=self; 372 } 373 374 public PyBuiltinFunction makeBound(PyObject self) { 375 return new exposed_count((PyUnicode)self,info); 376 } 377 378 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 379 try { 380 return Py.newInteger(self.unicode_count(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 381 } catch (PyObject.ConversionException e) { 382 String msg; 383 switch (e.index) { 384 case 1: 385 case 2: 386 msg="expected an integer"; 387 break; 388 case 0: 389 msg="expected a string"; 390 break; 391 default: 392 msg="xxx"; 393 } 394 throw Py.TypeError(msg); 395 } 396 } 397 398 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 399 PyUnicode self=(PyUnicode)gself; 400 try { 401 return Py.newInteger(self.unicode_count(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 402 } catch (PyObject.ConversionException e) { 403 String msg; 404 switch (e.index) { 405 case 1: 406 case 2: 407 msg="expected an integer"; 408 break; 409 case 0: 410 msg="expected a string"; 411 break; 412 default: 413 msg="xxx"; 414 } 415 throw Py.TypeError(msg); 416 } 417 } 418 419 public PyObject __call__(PyObject arg0,PyObject arg1) { 420 try { 421 return Py.newInteger(self.unicode_count(arg0.asString(0),arg1.asInt(1))); 422 } catch (PyObject.ConversionException e) { 423 String msg; 424 switch (e.index) { 425 case 1: 426 msg="expected an integer"; 427 break; 428 case 0: 429 msg="expected a string"; 430 break; 431 default: 432 msg="xxx"; 433 } 434 throw Py.TypeError(msg); 435 } 436 } 437 438 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 439 PyUnicode self=(PyUnicode)gself; 440 try { 441 return Py.newInteger(self.unicode_count(arg0.asString(0),arg1.asInt(1))); 442 } catch (PyObject.ConversionException e) { 443 String msg; 444 switch (e.index) { 445 case 1: 446 msg="expected an integer"; 447 break; 448 case 0: 449 msg="expected a string"; 450 break; 451 default: 452 msg="xxx"; 453 } 454 throw Py.TypeError(msg); 455 } 456 } 457 458 public PyObject __call__(PyObject arg0) { 459 try { 460 return Py.newInteger(self.unicode_count(arg0.asString(0))); 461 } catch (PyObject.ConversionException e) { 462 String msg; 463 switch (e.index) { 464 case 0: 465 msg="expected a string"; 466 break; 467 default: 468 msg="xxx"; 469 } 470 throw Py.TypeError(msg); 471 } 472 } 473 474 public PyObject inst_call(PyObject gself,PyObject arg0) { 475 PyUnicode self=(PyUnicode)gself; 476 try { 477 return Py.newInteger(self.unicode_count(arg0.asString(0))); 478 } catch (PyObject.ConversionException e) { 479 String msg; 480 switch (e.index) { 481 case 0: 482 msg="expected a string"; 483 break; 484 default: 485 msg="xxx"; 486 } 487 throw Py.TypeError(msg); 488 } 489 } 490 491 } 492 dict.__setitem__("count",new PyMethodDescr("count",PyUnicode.class,1,3,new exposed_count(null,null))); 493 class exposed_decode extends PyBuiltinFunctionNarrow { 494 495 private PyUnicode self; 496 497 public PyObject getSelf() { 498 return self; 499 } 500 501 exposed_decode(PyUnicode self,PyBuiltinFunction.Info info) { 502 super(info); 503 this.self=self; 504 } 505 506 public PyBuiltinFunction makeBound(PyObject self) { 507 return new exposed_decode((PyUnicode)self,info); 508 } 509 510 public PyObject __call__(PyObject arg0,PyObject arg1) { 511 try { 512 return new PyString(self.unicode_decode(arg0.asString(0),arg1.asString(1))); 513 } catch (PyObject.ConversionException e) { 514 String msg; 515 switch (e.index) { 516 case 0: 517 case 1: 518 msg="expected a string"; 519 break; 520 default: 521 msg="xxx"; 522 } 523 throw Py.TypeError(msg); 524 } 525 } 526 527 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 528 PyUnicode self=(PyUnicode)gself; 529 try { 530 return new PyString(self.unicode_decode(arg0.asString(0),arg1.asString(1))); 531 } catch (PyObject.ConversionException e) { 532 String msg; 533 switch (e.index) { 534 case 0: 535 case 1: 536 msg="expected a string"; 537 break; 538 default: 539 msg="xxx"; 540 } 541 throw Py.TypeError(msg); 542 } 543 } 544 545 public PyObject __call__(PyObject arg0) { 546 try { 547 return new PyString(self.unicode_decode(arg0.asString(0))); 548 } catch (PyObject.ConversionException e) { 549 String msg; 550 switch (e.index) { 551 case 0: 552 msg="expected a string"; 553 break; 554 default: 555 msg="xxx"; 556 } 557 throw Py.TypeError(msg); 558 } 559 } 560 561 public PyObject inst_call(PyObject gself,PyObject arg0) { 562 PyUnicode self=(PyUnicode)gself; 563 try { 564 return new PyString(self.unicode_decode(arg0.asString(0))); 565 } catch (PyObject.ConversionException e) { 566 String msg; 567 switch (e.index) { 568 case 0: 569 msg="expected a string"; 570 break; 571 default: 572 msg="xxx"; 573 } 574 throw Py.TypeError(msg); 575 } 576 } 577 578 public PyObject __call__() { 579 return new PyString(self.unicode_decode()); 580 } 581 582 public PyObject inst_call(PyObject gself) { 583 PyUnicode self=(PyUnicode)gself; 584 return new PyString(self.unicode_decode()); 585 } 586 587 } 588 dict.__setitem__("decode",new PyMethodDescr("decode",PyUnicode.class,0,2,new exposed_decode(null,null))); 589 class exposed_encode extends PyBuiltinFunctionNarrow { 590 591 private PyUnicode self; 592 593 public PyObject getSelf() { 594 return self; 595 } 596 597 exposed_encode(PyUnicode self,PyBuiltinFunction.Info info) { 598 super(info); 599 this.self=self; 600 } 601 602 public PyBuiltinFunction makeBound(PyObject self) { 603 return new exposed_encode((PyUnicode)self,info); 604 } 605 606 public PyObject __call__(PyObject arg0,PyObject arg1) { 607 try { 608 return new PyString(self.unicode_encode(arg0.asString(0),arg1.asString(1))); 609 } catch (PyObject.ConversionException e) { 610 String msg; 611 switch (e.index) { 612 case 0: 613 case 1: 614 msg="expected a string"; 615 break; 616 default: 617 msg="xxx"; 618 } 619 throw Py.TypeError(msg); 620 } 621 } 622 623 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 624 PyUnicode self=(PyUnicode)gself; 625 try { 626 return new PyString(self.unicode_encode(arg0.asString(0),arg1.asString(1))); 627 } catch (PyObject.ConversionException e) { 628 String msg; 629 switch (e.index) { 630 case 0: 631 case 1: 632 msg="expected a string"; 633 break; 634 default: 635 msg="xxx"; 636 } 637 throw Py.TypeError(msg); 638 } 639 } 640 641 public PyObject __call__(PyObject arg0) { 642 try { 643 return new PyString(self.unicode_encode(arg0.asString(0))); 644 } catch (PyObject.ConversionException e) { 645 String msg; 646 switch (e.index) { 647 case 0: 648 msg="expected a string"; 649 break; 650 default: 651 msg="xxx"; 652 } 653 throw Py.TypeError(msg); 654 } 655 } 656 657 public PyObject inst_call(PyObject gself,PyObject arg0) { 658 PyUnicode self=(PyUnicode)gself; 659 try { 660 return new PyString(self.unicode_encode(arg0.asString(0))); 661 } catch (PyObject.ConversionException e) { 662 String msg; 663 switch (e.index) { 664 case 0: 665 msg="expected a string"; 666 break; 667 default: 668 msg="xxx"; 669 } 670 throw Py.TypeError(msg); 671 } 672 } 673 674 public PyObject __call__() { 675 return new PyString(self.unicode_encode()); 676 } 677 678 public PyObject inst_call(PyObject gself) { 679 PyUnicode self=(PyUnicode)gself; 680 return new PyString(self.unicode_encode()); 681 } 682 683 } 684 dict.__setitem__("encode",new PyMethodDescr("encode",PyUnicode.class,0,2,new exposed_encode(null,null))); 685 class exposed_endswith extends PyBuiltinFunctionNarrow { 686 687 private PyUnicode self; 688 689 public PyObject getSelf() { 690 return self; 691 } 692 693 exposed_endswith(PyUnicode self,PyBuiltinFunction.Info info) { 694 super(info); 695 this.self=self; 696 } 697 698 public PyBuiltinFunction makeBound(PyObject self) { 699 return new exposed_endswith((PyUnicode)self,info); 700 } 701 702 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 703 try { 704 return Py.newBoolean(self.unicode_endswith(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 705 } catch (PyObject.ConversionException e) { 706 String msg; 707 switch (e.index) { 708 case 1: 709 case 2: 710 msg="expected an integer"; 711 break; 712 case 0: 713 msg="expected a string"; 714 break; 715 default: 716 msg="xxx"; 717 } 718 throw Py.TypeError(msg); 719 } 720 } 721 722 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 723 PyUnicode self=(PyUnicode)gself; 724 try { 725 return Py.newBoolean(self.unicode_endswith(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 726 } catch (PyObject.ConversionException e) { 727 String msg; 728 switch (e.index) { 729 case 1: 730 case 2: 731 msg="expected an integer"; 732 break; 733 case 0: 734 msg="expected a string"; 735 break; 736 default: 737 msg="xxx"; 738 } 739 throw Py.TypeError(msg); 740 } 741 } 742 743 public PyObject __call__(PyObject arg0,PyObject arg1) { 744 try { 745 return Py.newBoolean(self.unicode_endswith(arg0.asString(0),arg1.asInt(1))); 746 } catch (PyObject.ConversionException e) { 747 String msg; 748 switch (e.index) { 749 case 1: 750 msg="expected an integer"; 751 break; 752 case 0: 753 msg="expected a string"; 754 break; 755 default: 756 msg="xxx"; 757 } 758 throw Py.TypeError(msg); 759 } 760 } 761 762 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 763 PyUnicode self=(PyUnicode)gself; 764 try { 765 return Py.newBoolean(self.unicode_endswith(arg0.asString(0),arg1.asInt(1))); 766 } catch (PyObject.ConversionException e) { 767 String msg; 768 switch (e.index) { 769 case 1: 770 msg="expected an integer"; 771 break; 772 case 0: 773 msg="expected a string"; 774 break; 775 default: 776 msg="xxx"; 777 } 778 throw Py.TypeError(msg); 779 } 780 } 781 782 public PyObject __call__(PyObject arg0) { 783 try { 784 return Py.newBoolean(self.unicode_endswith(arg0.asString(0))); 785 } catch (PyObject.ConversionException e) { 786 String msg; 787 switch (e.index) { 788 case 0: 789 msg="expected a string"; 790 break; 791 default: 792 msg="xxx"; 793 } 794 throw Py.TypeError(msg); 795 } 796 } 797 798 public PyObject inst_call(PyObject gself,PyObject arg0) { 799 PyUnicode self=(PyUnicode)gself; 800 try { 801 return Py.newBoolean(self.unicode_endswith(arg0.asString(0))); 802 } catch (PyObject.ConversionException e) { 803 String msg; 804 switch (e.index) { 805 case 0: 806 msg="expected a string"; 807 break; 808 default: 809 msg="xxx"; 810 } 811 throw Py.TypeError(msg); 812 } 813 } 814 815 } 816 dict.__setitem__("endswith",new PyMethodDescr("endswith",PyUnicode.class,1,3,new exposed_endswith(null,null))); 817 class exposed_expandtabs extends PyBuiltinFunctionNarrow { 818 819 private PyUnicode self; 820 821 public PyObject getSelf() { 822 return self; 823 } 824 825 exposed_expandtabs(PyUnicode self,PyBuiltinFunction.Info info) { 826 super(info); 827 this.self=self; 828 } 829 830 public PyBuiltinFunction makeBound(PyObject self) { 831 return new exposed_expandtabs((PyUnicode)self,info); 832 } 833 834 public PyObject __call__(PyObject arg0) { 835 try { 836 return new PyString(self.unicode_expandtabs(arg0.asInt(0))); 837 } catch (PyObject.ConversionException e) { 838 String msg; 839 switch (e.index) { 840 case 0: 841 msg="expected an integer"; 842 break; 843 default: 844 msg="xxx"; 845 } 846 throw Py.TypeError(msg); 847 } 848 } 849 850 public PyObject inst_call(PyObject gself,PyObject arg0) { 851 PyUnicode self=(PyUnicode)gself; 852 try { 853 return new PyString(self.unicode_expandtabs(arg0.asInt(0))); 854 } catch (PyObject.ConversionException e) { 855 String msg; 856 switch (e.index) { 857 case 0: 858 msg="expected an integer"; 859 break; 860 default: 861 msg="xxx"; 862 } 863 throw Py.TypeError(msg); 864 } 865 } 866 867 public PyObject __call__() { 868 return new PyString(self.unicode_expandtabs()); 869 } 870 871 public PyObject inst_call(PyObject gself) { 872 PyUnicode self=(PyUnicode)gself; 873 return new PyString(self.unicode_expandtabs()); 874 } 875 876 } 877 dict.__setitem__("expandtabs",new PyMethodDescr("expandtabs",PyUnicode.class,0,1,new exposed_expandtabs(null,null))); 878 class exposed_find extends PyBuiltinFunctionNarrow { 879 880 private PyUnicode self; 881 882 public PyObject getSelf() { 883 return self; 884 } 885 886 exposed_find(PyUnicode self,PyBuiltinFunction.Info info) { 887 super(info); 888 this.self=self; 889 } 890 891 public PyBuiltinFunction makeBound(PyObject self) { 892 return new exposed_find((PyUnicode)self,info); 893 } 894 895 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 896 try { 897 return Py.newInteger(self.unicode_find(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 898 } catch (PyObject.ConversionException e) { 899 String msg; 900 switch (e.index) { 901 case 1: 902 case 2: 903 msg="expected an integer"; 904 break; 905 case 0: 906 msg="expected a string"; 907 break; 908 default: 909 msg="xxx"; 910 } 911 throw Py.TypeError(msg); 912 } 913 } 914 915 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 916 PyUnicode self=(PyUnicode)gself; 917 try { 918 return Py.newInteger(self.unicode_find(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 919 } catch (PyObject.ConversionException e) { 920 String msg; 921 switch (e.index) { 922 case 1: 923 case 2: 924 msg="expected an integer"; 925 break; 926 case 0: 927 msg="expected a string"; 928 break; 929 default: 930 msg="xxx"; 931 } 932 throw Py.TypeError(msg); 933 } 934 } 935 936 public PyObject __call__(PyObject arg0,PyObject arg1) { 937 try { 938 return Py.newInteger(self.unicode_find(arg0.asString(0),arg1.asInt(1))); 939 } catch (PyObject.ConversionException e) { 940 String msg; 941 switch (e.index) { 942 case 1: 943 msg="expected an integer"; 944 break; 945 case 0: 946 msg="expected a string"; 947 break; 948 default: 949 msg="xxx"; 950 } 951 throw Py.TypeError(msg); 952 } 953 } 954 955 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 956 PyUnicode self=(PyUnicode)gself; 957 try { 958 return Py.newInteger(self.unicode_find(arg0.asString(0),arg1.asInt(1))); 959 } catch (PyObject.ConversionException e) { 960 String msg; 961 switch (e.index) { 962 case 1: 963 msg="expected an integer"; 964 break; 965 case 0: 966 msg="expected a string"; 967 break; 968 default: 969 msg="xxx"; 970 } 971 throw Py.TypeError(msg); 972 } 973 } 974 975 public PyObject __call__(PyObject arg0) { 976 try { 977 return Py.newInteger(self.unicode_find(arg0.asString(0))); 978 } catch (PyObject.ConversionException e) { 979 String msg; 980 switch (e.index) { 981 case 0: 982 msg="expected a string"; 983 break; 984 default: 985 msg="xxx"; 986 } 987 throw Py.TypeError(msg); 988 } 989 } 990 991 public PyObject inst_call(PyObject gself,PyObject arg0) { 992 PyUnicode self=(PyUnicode)gself; 993 try { 994 return Py.newInteger(self.unicode_find(arg0.asString(0))); 995 } catch (PyObject.ConversionException e) { 996 String msg; 997 switch (e.index) { 998 case 0: 999 msg="expected a string"; 1000 break; 1001 default: 1002 msg="xxx"; 1003 } 1004 throw Py.TypeError(msg); 1005 } 1006 } 1007 1008 } 1009 dict.__setitem__("find",new PyMethodDescr("find",PyUnicode.class,1,3,new exposed_find(null,null))); 1010 class exposed_index extends PyBuiltinFunctionNarrow { 1011 1012 private PyUnicode self; 1013 1014 public PyObject getSelf() { 1015 return self; 1016 } 1017 1018 exposed_index(PyUnicode self,PyBuiltinFunction.Info info) { 1019 super(info); 1020 this.self=self; 1021 } 1022 1023 public PyBuiltinFunction makeBound(PyObject self) { 1024 return new exposed_index((PyUnicode)self,info); 1025 } 1026 1027 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 1028 try { 1029 return Py.newInteger(self.unicode_index(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 1030 } catch (PyObject.ConversionException e) { 1031 String msg; 1032 switch (e.index) { 1033 case 1: 1034 case 2: 1035 msg="expected an integer"; 1036 break; 1037 case 0: 1038 msg="expected a string"; 1039 break; 1040 default: 1041 msg="xxx"; 1042 } 1043 throw Py.TypeError(msg); 1044 } 1045 } 1046 1047 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 1048 PyUnicode self=(PyUnicode)gself; 1049 try { 1050 return Py.newInteger(self.unicode_index(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 1051 } catch (PyObject.ConversionException e) { 1052 String msg; 1053 switch (e.index) { 1054 case 1: 1055 case 2: 1056 msg="expected an integer"; 1057 break; 1058 case 0: 1059 msg="expected a string"; 1060 break; 1061 default: 1062 msg="xxx"; 1063 } 1064 throw Py.TypeError(msg); 1065 } 1066 } 1067 1068 public PyObject __call__(PyObject arg0,PyObject arg1) { 1069 try { 1070 return Py.newInteger(self.unicode_index(arg0.asString(0),arg1.asInt(1))); 1071 } catch (PyObject.ConversionException e) { 1072 String msg; 1073 switch (e.index) { 1074 case 1: 1075 msg="expected an integer"; 1076 break; 1077 case 0: 1078 msg="expected a string"; 1079 break; 1080 default: 1081 msg="xxx"; 1082 } 1083 throw Py.TypeError(msg); 1084 } 1085 } 1086 1087 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 1088 PyUnicode self=(PyUnicode)gself; 1089 try { 1090 return Py.newInteger(self.unicode_index(arg0.asString(0),arg1.asInt(1))); 1091 } catch (PyObject.ConversionException e) { 1092 String msg; 1093 switch (e.index) { 1094 case 1: 1095 msg="expected an integer"; 1096 break; 1097 case 0: 1098 msg="expected a string"; 1099 break; 1100 default: 1101 msg="xxx"; 1102 } 1103 throw Py.TypeError(msg); 1104 } 1105 } 1106 1107 public PyObject __call__(PyObject arg0) { 1108 try { 1109 return Py.newInteger(self.unicode_index(arg0.asString(0))); 1110 } catch (PyObject.ConversionException e) { 1111 String msg; 1112 switch (e.index) { 1113 case 0: 1114 msg="expected a string"; 1115 break; 1116 default: 1117 msg="xxx"; 1118 } 1119 throw Py.TypeError(msg); 1120 } 1121 } 1122 1123 public PyObject inst_call(PyObject gself,PyObject arg0) { 1124 PyUnicode self=(PyUnicode)gself; 1125 try { 1126 return Py.newInteger(self.unicode_index(arg0.asString(0))); 1127 } catch (PyObject.ConversionException e) { 1128 String msg; 1129 switch (e.index) { 1130 case 0: 1131 msg="expected a string"; 1132 break; 1133 default: 1134 msg="xxx"; 1135 } 1136 throw Py.TypeError(msg); 1137 } 1138 } 1139 1140 } 1141 dict.__setitem__("index",new PyMethodDescr("index",PyUnicode.class,1,3,new exposed_index(null,null))); 1142 class exposed_isalnum extends PyBuiltinFunctionNarrow { 1143 1144 private PyUnicode self; 1145 1146 public PyObject getSelf() { 1147 return self; 1148 } 1149 1150 exposed_isalnum(PyUnicode self,PyBuiltinFunction.Info info) { 1151 super(info); 1152 this.self=self; 1153 } 1154 1155 public PyBuiltinFunction makeBound(PyObject self) { 1156 return new exposed_isalnum((PyUnicode)self,info); 1157 } 1158 1159 public PyObject __call__() { 1160 return Py.newBoolean(self.unicode_isalnum()); 1161 } 1162 1163 public PyObject inst_call(PyObject gself) { 1164 PyUnicode self=(PyUnicode)gself; 1165 return Py.newBoolean(self.unicode_isalnum()); 1166 } 1167 1168 } 1169 dict.__setitem__("isalnum",new PyMethodDescr("isalnum",PyUnicode.class,0,0,new exposed_isalnum(null,null))); 1170 class exposed_isalpha extends PyBuiltinFunctionNarrow { 1171 1172 private PyUnicode self; 1173 1174 public PyObject getSelf() { 1175 return self; 1176 } 1177 1178 exposed_isalpha(PyUnicode self,PyBuiltinFunction.Info info) { 1179 super(info); 1180 this.self=self; 1181 } 1182 1183 public PyBuiltinFunction makeBound(PyObject self) { 1184 return new exposed_isalpha((PyUnicode)self,info); 1185 } 1186 1187 public PyObject __call__() { 1188 return Py.newBoolean(self.unicode_isalpha()); 1189 } 1190 1191 public PyObject inst_call(PyObject gself) { 1192 PyUnicode self=(PyUnicode)gself; 1193 return Py.newBoolean(self.unicode_isalpha()); 1194 } 1195 1196 } 1197 dict.__setitem__("isalpha",new PyMethodDescr("isalpha",PyUnicode.class,0,0,new exposed_isalpha(null,null))); 1198 class exposed_isdecimal extends PyBuiltinFunctionNarrow { 1199 1200 private PyUnicode self; 1201 1202 public PyObject getSelf() { 1203 return self; 1204 } 1205 1206 exposed_isdecimal(PyUnicode self,PyBuiltinFunction.Info info) { 1207 super(info); 1208 this.self=self; 1209 } 1210 1211 public PyBuiltinFunction makeBound(PyObject self) { 1212 return new exposed_isdecimal((PyUnicode)self,info); 1213 } 1214 1215 public PyObject __call__() { 1216 return Py.newBoolean(self.unicode_isdecimal()); 1217 } 1218 1219 public PyObject inst_call(PyObject gself) { 1220 PyUnicode self=(PyUnicode)gself; 1221 return Py.newBoolean(self.unicode_isdecimal()); 1222 } 1223 1224 } 1225 dict.__setitem__("isdecimal",new PyMethodDescr("isdecimal",PyUnicode.class,0,0,new exposed_isdecimal(null,null))); 1226 class exposed_isdigit extends PyBuiltinFunctionNarrow { 1227 1228 private PyUnicode self; 1229 1230 public PyObject getSelf() { 1231 return self; 1232 } 1233 1234 exposed_isdigit(PyUnicode self,PyBuiltinFunction.Info info) { 1235 super(info); 1236 this.self=self; 1237 } 1238 1239 public PyBuiltinFunction makeBound(PyObject self) { 1240 return new exposed_isdigit((PyUnicode)self,info); 1241 } 1242 1243 public PyObject __call__() { 1244 return Py.newBoolean(self.unicode_isdigit()); 1245 } 1246 1247 public PyObject inst_call(PyObject gself) { 1248 PyUnicode self=(PyUnicode)gself; 1249 return Py.newBoolean(self.unicode_isdigit()); 1250 } 1251 1252 } 1253 dict.__setitem__("isdigit",new PyMethodDescr("isdigit",PyUnicode.class,0,0,new exposed_isdigit(null,null))); 1254 class exposed_islower extends PyBuiltinFunctionNarrow { 1255 1256 private PyUnicode self; 1257 1258 public PyObject getSelf() { 1259 return self; 1260 } 1261 1262 exposed_islower(PyUnicode self,PyBuiltinFunction.Info info) { 1263 super(info); 1264 this.self=self; 1265 } 1266 1267 public PyBuiltinFunction makeBound(PyObject self) { 1268 return new exposed_islower((PyUnicode)self,info); 1269 } 1270 1271 public PyObject __call__() { 1272 return Py.newBoolean(self.unicode_islower()); 1273 } 1274 1275 public PyObject inst_call(PyObject gself) { 1276 PyUnicode self=(PyUnicode)gself; 1277 return Py.newBoolean(self.unicode_islower()); 1278 } 1279 1280 } 1281 dict.__setitem__("islower",new PyMethodDescr("islower",PyUnicode.class,0,0,new exposed_islower(null,null))); 1282 class exposed_isnumeric extends PyBuiltinFunctionNarrow { 1283 1284 private PyUnicode self; 1285 1286 public PyObject getSelf() { 1287 return self; 1288 } 1289 1290 exposed_isnumeric(PyUnicode self,PyBuiltinFunction.Info info) { 1291 super(info); 1292 this.self=self; 1293 } 1294 1295 public PyBuiltinFunction makeBound(PyObject self) { 1296 return new exposed_isnumeric((PyUnicode)self,info); 1297 } 1298 1299 public PyObject __call__() { 1300 return Py.newBoolean(self.unicode_isnumeric()); 1301 } 1302 1303 public PyObject inst_call(PyObject gself) { 1304 PyUnicode self=(PyUnicode)gself; 1305 return Py.newBoolean(self.unicode_isnumeric()); 1306 } 1307 1308 } 1309 dict.__setitem__("isnumeric",new PyMethodDescr("isnumeric",PyUnicode.class,0,0,new exposed_isnumeric(null,null))); 1310 class exposed_isspace extends PyBuiltinFunctionNarrow { 1311 1312 private PyUnicode self; 1313 1314 public PyObject getSelf() { 1315 return self; 1316 } 1317 1318 exposed_isspace(PyUnicode self,PyBuiltinFunction.Info info) { 1319 super(info); 1320 this.self=self; 1321 } 1322 1323 public PyBuiltinFunction makeBound(PyObject self) { 1324 return new exposed_isspace((PyUnicode)self,info); 1325 } 1326 1327 public PyObject __call__() { 1328 return Py.newBoolean(self.unicode_isspace()); 1329 } 1330 1331 public PyObject inst_call(PyObject gself) { 1332 PyUnicode self=(PyUnicode)gself; 1333 return Py.newBoolean(self.unicode_isspace()); 1334 } 1335 1336 } 1337 dict.__setitem__("isspace",new PyMethodDescr("isspace",PyUnicode.class,0,0,new exposed_isspace(null,null))); 1338 class exposed_istitle extends PyBuiltinFunctionNarrow { 1339 1340 private PyUnicode self; 1341 1342 public PyObject getSelf() { 1343 return self; 1344 } 1345 1346 exposed_istitle(PyUnicode self,PyBuiltinFunction.Info info) { 1347 super(info); 1348 this.self=self; 1349 } 1350 1351 public PyBuiltinFunction makeBound(PyObject self) { 1352 return new exposed_istitle((PyUnicode)self,info); 1353 } 1354 1355 public PyObject __call__() { 1356 return Py.newBoolean(self.unicode_istitle()); 1357 } 1358 1359 public PyObject inst_call(PyObject gself) { 1360 PyUnicode self=(PyUnicode)gself; 1361 return Py.newBoolean(self.unicode_istitle()); 1362 } 1363 1364 } 1365 dict.__setitem__("istitle",new PyMethodDescr("istitle",PyUnicode.class,0,0,new exposed_istitle(null,null))); 1366 class exposed_isunicode extends PyBuiltinFunctionNarrow { 1367 1368 private PyUnicode self; 1369 1370 public PyObject getSelf() { 1371 return self; 1372 } 1373 1374 exposed_isunicode(PyUnicode self,PyBuiltinFunction.Info info) { 1375 super(info); 1376 this.self=self; 1377 } 1378 1379 public PyBuiltinFunction makeBound(PyObject self) { 1380 return new exposed_isunicode((PyUnicode)self,info); 1381 } 1382 1383 public PyObject __call__() { 1384 return Py.newBoolean(self.unicode_isunicode()); 1385 } 1386 1387 public PyObject inst_call(PyObject gself) { 1388 PyUnicode self=(PyUnicode)gself; 1389 return Py.newBoolean(self.unicode_isunicode()); 1390 } 1391 1392 } 1393 dict.__setitem__("isunicode",new PyMethodDescr("isunicode",PyUnicode.class,0,0,new exposed_isunicode(null,null))); 1394 class exposed_isupper extends PyBuiltinFunctionNarrow { 1395 1396 private PyUnicode self; 1397 1398 public PyObject getSelf() { 1399 return self; 1400 } 1401 1402 exposed_isupper(PyUnicode self,PyBuiltinFunction.Info info) { 1403 super(info); 1404 this.self=self; 1405 } 1406 1407 public PyBuiltinFunction makeBound(PyObject self) { 1408 return new exposed_isupper((PyUnicode)self,info); 1409 } 1410 1411 public PyObject __call__() { 1412 return Py.newBoolean(self.unicode_isupper()); 1413 } 1414 1415 public PyObject inst_call(PyObject gself) { 1416 PyUnicode self=(PyUnicode)gself; 1417 return Py.newBoolean(self.unicode_isupper()); 1418 } 1419 1420 } 1421 dict.__setitem__("isupper",new PyMethodDescr("isupper",PyUnicode.class,0,0,new exposed_isupper(null,null))); 1422 class exposed_join extends PyBuiltinFunctionNarrow { 1423 1424 private PyUnicode self; 1425 1426 public PyObject getSelf() { 1427 return self; 1428 } 1429 1430 exposed_join(PyUnicode self,PyBuiltinFunction.Info info) { 1431 super(info); 1432 this.self=self; 1433 } 1434 1435 public PyBuiltinFunction makeBound(PyObject self) { 1436 return new exposed_join((PyUnicode)self,info); 1437 } 1438 1439 public PyObject __call__(PyObject arg0) { 1440 return new PyString(self.unicode_join(arg0)); 1441 } 1442 1443 public PyObject inst_call(PyObject gself,PyObject arg0) { 1444 PyUnicode self=(PyUnicode)gself; 1445 return new PyString(self.unicode_join(arg0)); 1446 } 1447 1448 } 1449 dict.__setitem__("join",new PyMethodDescr("join",PyUnicode.class,1,1,new exposed_join(null,null))); 1450 class exposed_ljust extends PyBuiltinFunctionNarrow { 1451 1452 private PyUnicode self; 1453 1454 public PyObject getSelf() { 1455 return self; 1456 } 1457 1458 exposed_ljust(PyUnicode self,PyBuiltinFunction.Info info) { 1459 super(info); 1460 this.self=self; 1461 } 1462 1463 public PyBuiltinFunction makeBound(PyObject self) { 1464 return new exposed_ljust((PyUnicode)self,info); 1465 } 1466 1467 public PyObject __call__(PyObject arg0) { 1468 try { 1469 return new PyString(self.unicode_ljust(arg0.asInt(0))); 1470 } catch (PyObject.ConversionException e) { 1471 String msg; 1472 switch (e.index) { 1473 case 0: 1474 msg="expected an integer"; 1475 break; 1476 default: 1477 msg="xxx"; 1478 } 1479 throw Py.TypeError(msg); 1480 } 1481 } 1482 1483 public PyObject inst_call(PyObject gself,PyObject arg0) { 1484 PyUnicode self=(PyUnicode)gself; 1485 try { 1486 return new PyString(self.unicode_ljust(arg0.asInt(0))); 1487 } catch (PyObject.ConversionException e) { 1488 String msg; 1489 switch (e.index) { 1490 case 0: 1491 msg="expected an integer"; 1492 break; 1493 default: 1494 msg="xxx"; 1495 } 1496 throw Py.TypeError(msg); 1497 } 1498 } 1499 1500 } 1501 dict.__setitem__("ljust",new PyMethodDescr("ljust",PyUnicode.class,1,1,new exposed_ljust(null,null))); 1502 class exposed_lower extends PyBuiltinFunctionNarrow { 1503 1504 private PyUnicode self; 1505 1506 public PyObject getSelf() { 1507 return self; 1508 } 1509 1510 exposed_lower(PyUnicode self,PyBuiltinFunction.Info info) { 1511 super(info); 1512 this.self=self; 1513 } 1514 1515 public PyBuiltinFunction makeBound(PyObject self) { 1516 return new exposed_lower((PyUnicode)self,info); 1517 } 1518 1519 public PyObject __call__() { 1520 return new PyString(self.unicode_lower()); 1521 } 1522 1523 public PyObject inst_call(PyObject gself) { 1524 PyUnicode self=(PyUnicode)gself; 1525 return new PyString(self.unicode_lower()); 1526 } 1527 1528 } 1529 dict.__setitem__("lower",new PyMethodDescr("lower",PyUnicode.class,0,0,new exposed_lower(null,null))); 1530 class exposed_lstrip extends PyBuiltinFunctionNarrow { 1531 1532 private PyUnicode self; 1533 1534 public PyObject getSelf() { 1535 return self; 1536 } 1537 1538 exposed_lstrip(PyUnicode self,PyBuiltinFunction.Info info) { 1539 super(info); 1540 this.self=self; 1541 } 1542 1543 public PyBuiltinFunction makeBound(PyObject self) { 1544 return new exposed_lstrip((PyUnicode)self,info); 1545 } 1546 1547 public PyObject __call__(PyObject arg0) { 1548 try { 1549 return new PyString(self.unicode_lstrip(arg0.asStringOrNull(0))); 1550 } catch (PyObject.ConversionException e) { 1551 String msg; 1552 switch (e.index) { 1553 case 0: 1554 msg="expected a string or None"; 1555 break; 1556 default: 1557 msg="xxx"; 1558 } 1559 throw Py.TypeError(msg); 1560 } 1561 } 1562 1563 public PyObject inst_call(PyObject gself,PyObject arg0) { 1564 PyUnicode self=(PyUnicode)gself; 1565 try { 1566 return new PyString(self.unicode_lstrip(arg0.asStringOrNull(0))); 1567 } catch (PyObject.ConversionException e) { 1568 String msg; 1569 switch (e.index) { 1570 case 0: 1571 msg="expected a string or None"; 1572 break; 1573 default: 1574 msg="xxx"; 1575 } 1576 throw Py.TypeError(msg); 1577 } 1578 } 1579 1580 public PyObject __call__() { 1581 return new PyString(self.unicode_lstrip()); 1582 } 1583 1584 public PyObject inst_call(PyObject gself) { 1585 PyUnicode self=(PyUnicode)gself; 1586 return new PyString(self.unicode_lstrip()); 1587 } 1588 1589 } 1590 dict.__setitem__("lstrip",new PyMethodDescr("lstrip",PyUnicode.class,0,1,new exposed_lstrip(null,null))); 1591 class exposed_replace extends PyBuiltinFunctionNarrow { 1592 1593 private PyUnicode self; 1594 1595 public PyObject getSelf() { 1596 return self; 1597 } 1598 1599 exposed_replace(PyUnicode self,PyBuiltinFunction.Info info) { 1600 super(info); 1601 this.self=self; 1602 } 1603 1604 public PyBuiltinFunction makeBound(PyObject self) { 1605 return new exposed_replace((PyUnicode)self,info); 1606 } 1607 1608 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 1609 try { 1610 return new PyString(self.unicode_replace(arg0.asString(0),arg1.asString(1),arg2.asInt(2))); 1611 } catch (PyObject.ConversionException e) { 1612 String msg; 1613 switch (e.index) { 1614 case 2: 1615 msg="expected an integer"; 1616 break; 1617 case 0: 1618 case 1: 1619 msg="expected a string"; 1620 break; 1621 default: 1622 msg="xxx"; 1623 } 1624 throw Py.TypeError(msg); 1625 } 1626 } 1627 1628 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 1629 PyUnicode self=(PyUnicode)gself; 1630 try { 1631 return new PyString(self.unicode_replace(arg0.asString(0),arg1.asString(1),arg2.asInt(2))); 1632 } catch (PyObject.ConversionException e) { 1633 String msg; 1634 switch (e.index) { 1635 case 2: 1636 msg="expected an integer"; 1637 break; 1638 case 0: 1639 case 1: 1640 msg="expected a string"; 1641 break; 1642 default: 1643 msg="xxx"; 1644 } 1645 throw Py.TypeError(msg); 1646 } 1647 } 1648 1649 public PyObject __call__(PyObject arg0,PyObject arg1) { 1650 try { 1651 return new PyString(self.unicode_replace(arg0.asString(0),arg1.asString(1))); 1652 } catch (PyObject.ConversionException e) { 1653 String msg; 1654 switch (e.index) { 1655 case 0: 1656 case 1: 1657 msg="expected a string"; 1658 break; 1659 default: 1660 msg="xxx"; 1661 } 1662 throw Py.TypeError(msg); 1663 } 1664 } 1665 1666 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 1667 PyUnicode self=(PyUnicode)gself; 1668 try { 1669 return new PyString(self.unicode_replace(arg0.asString(0),arg1.asString(1))); 1670 } catch (PyObject.ConversionException e) { 1671 String msg; 1672 switch (e.index) { 1673 case 0: 1674 case 1: 1675 msg="expected a string"; 1676 break; 1677 default: 1678 msg="xxx"; 1679 } 1680 throw Py.TypeError(msg); 1681 } 1682 } 1683 1684 } 1685 dict.__setitem__("replace",new PyMethodDescr("replace",PyUnicode.class,2,3,new exposed_replace(null,null))); 1686 class exposed_rfind extends PyBuiltinFunctionNarrow { 1687 1688 private PyUnicode self; 1689 1690 public PyObject getSelf() { 1691 return self; 1692 } 1693 1694 exposed_rfind(PyUnicode self,PyBuiltinFunction.Info info) { 1695 super(info); 1696 this.self=self; 1697 } 1698 1699 public PyBuiltinFunction makeBound(PyObject self) { 1700 return new exposed_rfind((PyUnicode)self,info); 1701 } 1702 1703 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 1704 try { 1705 return Py.newInteger(self.unicode_rfind(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 1706 } catch (PyObject.ConversionException e) { 1707 String msg; 1708 switch (e.index) { 1709 case 1: 1710 case 2: 1711 msg="expected an integer"; 1712 break; 1713 case 0: 1714 msg="expected a string"; 1715 break; 1716 default: 1717 msg="xxx"; 1718 } 1719 throw Py.TypeError(msg); 1720 } 1721 } 1722 1723 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 1724 PyUnicode self=(PyUnicode)gself; 1725 try { 1726 return Py.newInteger(self.unicode_rfind(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 1727 } catch (PyObject.ConversionException e) { 1728 String msg; 1729 switch (e.index) { 1730 case 1: 1731 case 2: 1732 msg="expected an integer"; 1733 break; 1734 case 0: 1735 msg="expected a string"; 1736 break; 1737 default: 1738 msg="xxx"; 1739 } 1740 throw Py.TypeError(msg); 1741 } 1742 } 1743 1744 public PyObject __call__(PyObject arg0,PyObject arg1) { 1745 try { 1746 return Py.newInteger(self.unicode_rfind(arg0.asString(0),arg1.asInt(1))); 1747 } catch (PyObject.ConversionException e) { 1748 String msg; 1749 switch (e.index) { 1750 case 1: 1751 msg="expected an integer"; 1752 break; 1753 case 0: 1754 msg="expected a string"; 1755 break; 1756 default: 1757 msg="xxx"; 1758 } 1759 throw Py.TypeError(msg); 1760 } 1761 } 1762 1763 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 1764 PyUnicode self=(PyUnicode)gself; 1765 try { 1766 return Py.newInteger(self.unicode_rfind(arg0.asString(0),arg1.asInt(1))); 1767 } catch (PyObject.ConversionException e) { 1768 String msg; 1769 switch (e.index) { 1770 case 1: 1771 msg="expected an integer"; 1772 break; 1773 case 0: 1774 msg="expected a string"; 1775 break; 1776 default: 1777 msg="xxx"; 1778 } 1779 throw Py.TypeError(msg); 1780 } 1781 } 1782 1783 public PyObject __call__(PyObject arg0) { 1784 try { 1785 return Py.newInteger(self.unicode_rfind(arg0.asString(0))); 1786 } catch (PyObject.ConversionException e) { 1787 String msg; 1788 switch (e.index) { 1789 case 0: 1790 msg="expected a string"; 1791 break; 1792 default: 1793 msg="xxx"; 1794 } 1795 throw Py.TypeError(msg); 1796 } 1797 } 1798 1799 public PyObject inst_call(PyObject gself,PyObject arg0) { 1800 PyUnicode self=(PyUnicode)gself; 1801 try { 1802 return Py.newInteger(self.unicode_rfind(arg0.asString(0))); 1803 } catch (PyObject.ConversionException e) { 1804 String msg; 1805 switch (e.index) { 1806 case 0: 1807 msg="expected a string"; 1808 break; 1809 default: 1810 msg="xxx"; 1811 } 1812 throw Py.TypeError(msg); 1813 } 1814 } 1815 1816 } 1817 dict.__setitem__("rfind",new PyMethodDescr("rfind",PyUnicode.class,1,3,new exposed_rfind(null,null))); 1818 class exposed_rindex extends PyBuiltinFunctionNarrow { 1819 1820 private PyUnicode self; 1821 1822 public PyObject getSelf() { 1823 return self; 1824 } 1825 1826 exposed_rindex(PyUnicode self,PyBuiltinFunction.Info info) { 1827 super(info); 1828 this.self=self; 1829 } 1830 1831 public PyBuiltinFunction makeBound(PyObject self) { 1832 return new exposed_rindex((PyUnicode)self,info); 1833 } 1834 1835 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 1836 try { 1837 return Py.newInteger(self.unicode_rindex(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 1838 } catch (PyObject.ConversionException e) { 1839 String msg; 1840 switch (e.index) { 1841 case 1: 1842 case 2: 1843 msg="expected an integer"; 1844 break; 1845 case 0: 1846 msg="expected a string"; 1847 break; 1848 default: 1849 msg="xxx"; 1850 } 1851 throw Py.TypeError(msg); 1852 } 1853 } 1854 1855 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 1856 PyUnicode self=(PyUnicode)gself; 1857 try { 1858 return Py.newInteger(self.unicode_rindex(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 1859 } catch (PyObject.ConversionException e) { 1860 String msg; 1861 switch (e.index) { 1862 case 1: 1863 case 2: 1864 msg="expected an integer"; 1865 break; 1866 case 0: 1867 msg="expected a string"; 1868 break; 1869 default: 1870 msg="xxx"; 1871 } 1872 throw Py.TypeError(msg); 1873 } 1874 } 1875 1876 public PyObject __call__(PyObject arg0,PyObject arg1) { 1877 try { 1878 return Py.newInteger(self.unicode_rindex(arg0.asString(0),arg1.asInt(1))); 1879 } catch (PyObject.ConversionException e) { 1880 String msg; 1881 switch (e.index) { 1882 case 1: 1883 msg="expected an integer"; 1884 break; 1885 case 0: 1886 msg="expected a string"; 1887 break; 1888 default: 1889 msg="xxx"; 1890 } 1891 throw Py.TypeError(msg); 1892 } 1893 } 1894 1895 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 1896 PyUnicode self=(PyUnicode)gself; 1897 try { 1898 return Py.newInteger(self.unicode_rindex(arg0.asString(0),arg1.asInt(1))); 1899 } catch (PyObject.ConversionException e) { 1900 String msg; 1901 switch (e.index) { 1902 case 1: 1903 msg="expected an integer"; 1904 break; 1905 case 0: 1906 msg="expected a string"; 1907 break; 1908 default: 1909 msg="xxx"; 1910 } 1911 throw Py.TypeError(msg); 1912 } 1913 } 1914 1915 public PyObject __call__(PyObject arg0) { 1916 try { 1917 return Py.newInteger(self.unicode_rindex(arg0.asString(0))); 1918 } catch (PyObject.ConversionException e) { 1919 String msg; 1920 switch (e.index) { 1921 case 0: 1922 msg="expected a string"; 1923 break; 1924 default: 1925 msg="xxx"; 1926 } 1927 throw Py.TypeError(msg); 1928 } 1929 } 1930 1931 public PyObject inst_call(PyObject gself,PyObject arg0) { 1932 PyUnicode self=(PyUnicode)gself; 1933 try { 1934 return Py.newInteger(self.unicode_rindex(arg0.asString(0))); 1935 } catch (PyObject.ConversionException e) { 1936 String msg; 1937 switch (e.index) { 1938 case 0: 1939 msg="expected a string"; 1940 break; 1941 default: 1942 msg="xxx"; 1943 } 1944 throw Py.TypeError(msg); 1945 } 1946 } 1947 1948 } 1949 dict.__setitem__("rindex",new PyMethodDescr("rindex",PyUnicode.class,1,3,new exposed_rindex(null,null))); 1950 class exposed_rjust extends PyBuiltinFunctionNarrow { 1951 1952 private PyUnicode self; 1953 1954 public PyObject getSelf() { 1955 return self; 1956 } 1957 1958 exposed_rjust(PyUnicode self,PyBuiltinFunction.Info info) { 1959 super(info); 1960 this.self=self; 1961 } 1962 1963 public PyBuiltinFunction makeBound(PyObject self) { 1964 return new exposed_rjust((PyUnicode)self,info); 1965 } 1966 1967 public PyObject __call__(PyObject arg0) { 1968 try { 1969 return new PyString(self.unicode_rjust(arg0.asInt(0))); 1970 } catch (PyObject.ConversionException e) { 1971 String msg; 1972 switch (e.index) { 1973 case 0: 1974 msg="expected an integer"; 1975 break; 1976 default: 1977 msg="xxx"; 1978 } 1979 throw Py.TypeError(msg); 1980 } 1981 } 1982 1983 public PyObject inst_call(PyObject gself,PyObject arg0) { 1984 PyUnicode self=(PyUnicode)gself; 1985 try { 1986 return new PyString(self.unicode_rjust(arg0.asInt(0))); 1987 } catch (PyObject.ConversionException e) { 1988 String msg; 1989 switch (e.index) { 1990 case 0: 1991 msg="expected an integer"; 1992 break; 1993 default: 1994 msg="xxx"; 1995 } 1996 throw Py.TypeError(msg); 1997 } 1998 } 1999 2000 } 2001 dict.__setitem__("rjust",new PyMethodDescr("rjust",PyUnicode.class,1,1,new exposed_rjust(null,null))); 2002 class exposed_rstrip extends PyBuiltinFunctionNarrow { 2003 2004 private PyUnicode self; 2005 2006 public PyObject getSelf() { 2007 return self; 2008 } 2009 2010 exposed_rstrip(PyUnicode self,PyBuiltinFunction.Info info) { 2011 super(info); 2012 this.self=self; 2013 } 2014 2015 public PyBuiltinFunction makeBound(PyObject self) { 2016 return new exposed_rstrip((PyUnicode)self,info); 2017 } 2018 2019 public PyObject __call__(PyObject arg0) { 2020 try { 2021 return new PyString(self.unicode_rstrip(arg0.asStringOrNull(0))); 2022 } catch (PyObject.ConversionException e) { 2023 String msg; 2024 switch (e.index) { 2025 case 0: 2026 msg="expected a string or None"; 2027 break; 2028 default: 2029 msg="xxx"; 2030 } 2031 throw Py.TypeError(msg); 2032 } 2033 } 2034 2035 public PyObject inst_call(PyObject gself,PyObject arg0) { 2036 PyUnicode self=(PyUnicode)gself; 2037 try { 2038 return new PyString(self.unicode_rstrip(arg0.asStringOrNull(0))); 2039 } catch (PyObject.ConversionException e) { 2040 String msg; 2041 switch (e.index) { 2042 case 0: 2043 msg="expected a string or None"; 2044 break; 2045 default: 2046 msg="xxx"; 2047 } 2048 throw Py.TypeError(msg); 2049 } 2050 } 2051 2052 public PyObject __call__() { 2053 return new PyString(self.unicode_rstrip()); 2054 } 2055 2056 public PyObject inst_call(PyObject gself) { 2057 PyUnicode self=(PyUnicode)gself; 2058 return new PyString(self.unicode_rstrip()); 2059 } 2060 2061 } 2062 dict.__setitem__("rstrip",new PyMethodDescr("rstrip",PyUnicode.class,0,1,new exposed_rstrip(null,null))); 2063 class exposed_split extends PyBuiltinFunctionNarrow { 2064 2065 private PyUnicode self; 2066 2067 public PyObject getSelf() { 2068 return self; 2069 } 2070 2071 exposed_split(PyUnicode self,PyBuiltinFunction.Info info) { 2072 super(info); 2073 this.self=self; 2074 } 2075 2076 public PyBuiltinFunction makeBound(PyObject self) { 2077 return new exposed_split((PyUnicode)self,info); 2078 } 2079 2080 public PyObject __call__(PyObject arg0,PyObject arg1) { 2081 try { 2082 return self.unicode_split(arg0.asStringOrNull(0),arg1.asInt(1)); 2083 } catch (PyObject.ConversionException e) { 2084 String msg; 2085 switch (e.index) { 2086 case 1: 2087 msg="expected an integer"; 2088 break; 2089 case 0: 2090 msg="expected a string or None"; 2091 break; 2092 default: 2093 msg="xxx"; 2094 } 2095 throw Py.TypeError(msg); 2096 } 2097 } 2098 2099 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 2100 PyUnicode self=(PyUnicode)gself; 2101 try { 2102 return self.unicode_split(arg0.asStringOrNull(0),arg1.asInt(1)); 2103 } catch (PyObject.ConversionException e) { 2104 String msg; 2105 switch (e.index) { 2106 case 1: 2107 msg="expected an integer"; 2108 break; 2109 case 0: 2110 msg="expected a string or None"; 2111 break; 2112 default: 2113 msg="xxx"; 2114 } 2115 throw Py.TypeError(msg); 2116 } 2117 } 2118 2119 public PyObject __call__(PyObject arg0) { 2120 try { 2121 return self.unicode_split(arg0.asStringOrNull(0)); 2122 } catch (PyObject.ConversionException e) { 2123 String msg; 2124 switch (e.index) { 2125 case 0: 2126 msg="expected a string or None"; 2127 break; 2128 default: 2129 msg="xxx"; 2130 } 2131 throw Py.TypeError(msg); 2132 } 2133 } 2134 2135 public PyObject inst_call(PyObject gself,PyObject arg0) { 2136 PyUnicode self=(PyUnicode)gself; 2137 try { 2138 return self.unicode_split(arg0.asStringOrNull(0)); 2139 } catch (PyObject.ConversionException e) { 2140 String msg; 2141 switch (e.index) { 2142 case 0: 2143 msg="expected a string or None"; 2144 break; 2145 default: 2146 msg="xxx"; 2147 } 2148 throw Py.TypeError(msg); 2149 } 2150 } 2151 2152 public PyObject __call__() { 2153 return self.unicode_split(); 2154 } 2155 2156 public PyObject inst_call(PyObject gself) { 2157 PyUnicode self=(PyUnicode)gself; 2158 return self.unicode_split(); 2159 } 2160 2161 } 2162 dict.__setitem__("split",new PyMethodDescr("split",PyUnicode.class,0,2,new exposed_split(null,null))); 2163 class exposed_splitlines extends PyBuiltinFunctionNarrow { 2164 2165 private PyUnicode self; 2166 2167 public PyObject getSelf() { 2168 return self; 2169 } 2170 2171 exposed_splitlines(PyUnicode self,PyBuiltinFunction.Info info) { 2172 super(info); 2173 this.self=self; 2174 } 2175 2176 public PyBuiltinFunction makeBound(PyObject self) { 2177 return new exposed_splitlines((PyUnicode)self,info); 2178 } 2179 2180 public PyObject __call__(PyObject arg0) { 2181 return self.unicode_splitlines(arg0.__nonzero__()); 2182 } 2183 2184 public PyObject inst_call(PyObject gself,PyObject arg0) { 2185 PyUnicode self=(PyUnicode)gself; 2186 return self.unicode_splitlines(arg0.__nonzero__()); 2187 } 2188 2189 public PyObject __call__() { 2190 return self.unicode_splitlines(); 2191 } 2192 2193 public PyObject inst_call(PyObject gself) { 2194 PyUnicode self=(PyUnicode)gself; 2195 return self.unicode_splitlines(); 2196 } 2197 2198 } 2199 dict.__setitem__("splitlines",new PyMethodDescr("splitlines",PyUnicode.class,0,1,new exposed_splitlines(null,null))); 2200 class exposed_startswith extends PyBuiltinFunctionNarrow { 2201 2202 private PyUnicode self; 2203 2204 public PyObject getSelf() { 2205 return self; 2206 } 2207 2208 exposed_startswith(PyUnicode self,PyBuiltinFunction.Info info) { 2209 super(info); 2210 this.self=self; 2211 } 2212 2213 public PyBuiltinFunction makeBound(PyObject self) { 2214 return new exposed_startswith((PyUnicode)self,info); 2215 } 2216 2217 public PyObject __call__(PyObject arg0,PyObject arg1,PyObject arg2) { 2218 try { 2219 return Py.newBoolean(self.unicode_startswith(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 2220 } catch (PyObject.ConversionException e) { 2221 String msg; 2222 switch (e.index) { 2223 case 1: 2224 case 2: 2225 msg="expected an integer"; 2226 break; 2227 case 0: 2228 msg="expected a string"; 2229 break; 2230 default: 2231 msg="xxx"; 2232 } 2233 throw Py.TypeError(msg); 2234 } 2235 } 2236 2237 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1,PyObject arg2) { 2238 PyUnicode self=(PyUnicode)gself; 2239 try { 2240 return Py.newBoolean(self.unicode_startswith(arg0.asString(0),arg1.asInt(1),arg2.asInt(2))); 2241 } catch (PyObject.ConversionException e) { 2242 String msg; 2243 switch (e.index) { 2244 case 1: 2245 case 2: 2246 msg="expected an integer"; 2247 break; 2248 case 0: 2249 msg="expected a string"; 2250 break; 2251 default: 2252 msg="xxx"; 2253 } 2254 throw Py.TypeError(msg); 2255 } 2256 } 2257 2258 public PyObject __call__(PyObject arg0,PyObject arg1) { 2259 try { 2260 return Py.newBoolean(self.unicode_startswith(arg0.asString(0),arg1.asInt(1))); 2261 } catch (PyObject.ConversionException e) { 2262 String msg; 2263 switch (e.index) { 2264 case 1: 2265 msg="expected an integer"; 2266 break; 2267 case 0: 2268 msg="expected a string"; 2269 break; 2270 default: 2271 msg="xxx"; 2272 } 2273 throw Py.TypeError(msg); 2274 } 2275 } 2276 2277 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 2278 PyUnicode self=(PyUnicode)gself; 2279 try { 2280 return Py.newBoolean(self.unicode_startswith(arg0.asString(0),arg1.asInt(1))); 2281 } catch (PyObject.ConversionException e) { 2282 String msg; 2283 switch (e.index) { 2284 case 1: 2285 msg="expected an integer"; 2286 break; 2287 case 0: 2288 msg="expected a string"; 2289 break; 2290 default: 2291 msg="xxx"; 2292 } 2293 throw Py.TypeError(msg); 2294 } 2295 } 2296 2297 public PyObject __call__(PyObject arg0) { 2298 try { 2299 return Py.newBoolean(self.unicode_startswith(arg0.asString(0))); 2300 } catch (PyObject.ConversionException e) { 2301 String msg; 2302 switch (e.index) { 2303 case 0: 2304 msg="expected a string"; 2305 break; 2306 default: 2307 msg="xxx"; 2308 } 2309 throw Py.TypeError(msg); 2310 } 2311 } 2312 2313 public PyObject inst_call(PyObject gself,PyObject arg0) { 2314 PyUnicode self=(PyUnicode)gself; 2315 try { 2316 return Py.newBoolean(self.unicode_startswith(arg0.asString(0))); 2317 } catch (PyObject.ConversionException e) { 2318 String msg; 2319 switch (e.index) { 2320 case 0: 2321 msg="expected a string"; 2322 break; 2323 default: 2324 msg="xxx"; 2325 } 2326 throw Py.TypeError(msg); 2327 } 2328 } 2329 2330 } 2331 dict.__setitem__("startswith",new PyMethodDescr("startswith",PyUnicode.class,1,3,new exposed_startswith(null,null))); 2332 class exposed_strip extends PyBuiltinFunctionNarrow { 2333 2334 private PyUnicode self; 2335 2336 public PyObject getSelf() { 2337 return self; 2338 } 2339 2340 exposed_strip(PyUnicode self,PyBuiltinFunction.Info info) { 2341 super(info); 2342 this.self=self; 2343 } 2344 2345 public PyBuiltinFunction makeBound(PyObject self) { 2346 return new exposed_strip((PyUnicode)self,info); 2347 } 2348 2349 public PyObject __call__(PyObject arg0) { 2350 try { 2351 return new PyString(self.unicode_strip(arg0.asStringOrNull(0))); 2352 } catch (PyObject.ConversionException e) { 2353 String msg; 2354 switch (e.index) { 2355 case 0: 2356 msg="expected a string or None"; 2357 break; 2358 default: 2359 msg="xxx"; 2360 } 2361 throw Py.TypeError(msg); 2362 } 2363 } 2364 2365 public PyObject inst_call(PyObject gself,PyObject arg0) { 2366 PyUnicode self=(PyUnicode)gself; 2367 try { 2368 return new PyString(self.unicode_strip(arg0.asStringOrNull(0))); 2369 } catch (PyObject.ConversionException e) { 2370 String msg; 2371 switch (e.index) { 2372 case 0: 2373 msg="expected a string or None"; 2374 break; 2375 default: 2376 msg="xxx"; 2377 } 2378 throw Py.TypeError(msg); 2379 } 2380 } 2381 2382 public PyObject __call__() { 2383 return new PyString(self.unicode_strip()); 2384 } 2385 2386 public PyObject inst_call(PyObject gself) { 2387 PyUnicode self=(PyUnicode)gself; 2388 return new PyString(self.unicode_strip()); 2389 } 2390 2391 } 2392 dict.__setitem__("strip",new PyMethodDescr("strip",PyUnicode.class,0,1,new exposed_strip(null,null))); 2393 class exposed_swapcase extends PyBuiltinFunctionNarrow { 2394 2395 private PyUnicode self; 2396 2397 public PyObject getSelf() { 2398 return self; 2399 } 2400 2401 exposed_swapcase(PyUnicode self,PyBuiltinFunction.Info info) { 2402 super(info); 2403 this.self=self; 2404 } 2405 2406 public PyBuiltinFunction makeBound(PyObject self) { 2407 return new exposed_swapcase((PyUnicode)self,info); 2408 } 2409 2410 public PyObject __call__() { 2411 return new PyString(self.unicode_swapcase()); 2412 } 2413 2414 public PyObject inst_call(PyObject gself) { 2415 PyUnicode self=(PyUnicode)gself; 2416 return new PyString(self.unicode_swapcase()); 2417 } 2418 2419 } 2420 dict.__setitem__("swapcase",new PyMethodDescr("swapcase",PyUnicode.class,0,0,new exposed_swapcase(null,null))); 2421 class exposed_title extends PyBuiltinFunctionNarrow { 2422 2423 private PyUnicode self; 2424 2425 public PyObject getSelf() { 2426 return self; 2427 } 2428 2429 exposed_title(PyUnicode self,PyBuiltinFunction.Info info) { 2430 super(info); 2431 this.self=self; 2432 } 2433 2434 public PyBuiltinFunction makeBound(PyObject self) { 2435 return new exposed_title((PyUnicode)self,info); 2436 } 2437 2438 public PyObject __call__() { 2439 return new PyString(self.unicode_title()); 2440 } 2441 2442 public PyObject inst_call(PyObject gself) { 2443 PyUnicode self=(PyUnicode)gself; 2444 return new PyString(self.unicode_title()); 2445 } 2446 2447 } 2448 dict.__setitem__("title",new PyMethodDescr("title",PyUnicode.class,0,0,new exposed_title(null,null))); 2449 class exposed_translate extends PyBuiltinFunctionNarrow { 2450 2451 private PyUnicode self; 2452 2453 public PyObject getSelf() { 2454 return self; 2455 } 2456 2457 exposed_translate(PyUnicode self,PyBuiltinFunction.Info info) { 2458 super(info); 2459 this.self=self; 2460 } 2461 2462 public PyBuiltinFunction makeBound(PyObject self) { 2463 return new exposed_translate((PyUnicode)self,info); 2464 } 2465 2466 public PyObject __call__(PyObject arg0,PyObject arg1) { 2467 try { 2468 return new PyString(self.unicode_translate(arg0.asString(0),arg1.asString(1))); 2469 } catch (PyObject.ConversionException e) { 2470 String msg; 2471 switch (e.index) { 2472 case 0: 2473 case 1: 2474 msg="expected a string"; 2475 break; 2476 default: 2477 msg="xxx"; 2478 } 2479 throw Py.TypeError(msg); 2480 } 2481 } 2482 2483 public PyObject inst_call(PyObject gself,PyObject arg0,PyObject arg1) { 2484 PyUnicode self=(PyUnicode)gself; 2485 try { 2486 return new PyString(self.unicode_translate(arg0.asString(0),arg1.asString(1))); 2487 } catch (PyObject.ConversionException e) { 2488 String msg; 2489 switch (e.index) { 2490 case 0: 2491 case 1: 2492 msg="expected a string"; 2493 break; 2494 default: 2495 msg="xxx"; 2496 } 2497 throw Py.TypeError(msg); 2498 } 2499 } 2500 2501 public PyObject __call__(PyObject arg0) { 2502 try { 2503 return new PyString(self.unicode_translate(arg0.asString(0))); 2504 } catch (PyObject.ConversionException e) { 2505 String msg; 2506 switch (e.index) { 2507 case 0: 2508 msg="expected a string"; 2509 break; 2510 default: 2511 msg="xxx"; 2512 } 2513 throw Py.TypeError(msg); 2514 } 2515 } 2516 2517 public PyObject inst_call(PyObject gself,PyObject arg0) { 2518 PyUnicode self=(PyUnicode)gself; 2519 try { 2520 return new PyString(self.unicode_translate(arg0.asString(0))); 2521 } catch (PyObject.ConversionException e) { 2522 String msg; 2523 switch (e.index) { 2524 case 0: 2525 msg="expected a string"; 2526 break; 2527 default: 2528 msg="xxx"; 2529 } 2530 throw Py.TypeError(msg); 2531 } 2532 } 2533 2534 } 2535 dict.__setitem__("translate",new PyMethodDescr("translate",PyUnicode.class,1,2,new exposed_translate(null,null))); 2536 class exposed_upper extends PyBuiltinFunctionNarrow { 2537 2538 private PyUnicode self; 2539 2540 public PyObject getSelf() { 2541 return self; 2542 } 2543 2544 exposed_upper(PyUnicode self,PyBuiltinFunction.Info info) { 2545 super(info); 2546 this.self=self; 2547 } 2548 2549 public PyBuiltinFunction makeBound(PyObject self) { 2550 return new exposed_upper((PyUnicode)self,info); 2551 } 2552 2553 public PyObject __call__() { 2554 return new PyString(self.unicode_upper()); 2555 } 2556 2557 public PyObject inst_call(PyObject gself) { 2558 PyUnicode self=(PyUnicode)gself; 2559 return new PyString(self.unicode_upper()); 2560 } 2561 2562 } 2563 dict.__setitem__("upper",new PyMethodDescr("upper",PyUnicode.class,0,0,new exposed_upper(null,null))); 2564 class exposed_zfill extends PyBuiltinFunctionNarrow { 2565 2566 private PyUnicode self; 2567 2568 public PyObject getSelf() { 2569 return self; 2570 } 2571 2572 exposed_zfill(PyUnicode self,PyBuiltinFunction.Info info) { 2573 super(info); 2574 this.self=self; 2575 } 2576 2577 public PyBuiltinFunction makeBound(PyObject self) { 2578 return new exposed_zfill((PyUnicode)self,info); 2579 } 2580 2581 public PyObject __call__(PyObject arg0) { 2582 try { 2583 return new PyString(self.unicode_zfill(arg0.asInt(0))); 2584 } catch (PyObject.ConversionException e) { 2585 String msg; 2586 switch (e.index) { 2587 case 0: 2588 msg="expected an integer"; 2589 break; 2590 default: 2591 msg="xxx"; 2592 } 2593 throw Py.TypeError(msg); 2594 } 2595 } 2596 2597 public PyObject inst_call(PyObject gself,PyObject arg0) { 2598 PyUnicode self=(PyUnicode)gself; 2599 try { 2600 return new PyString(self.unicode_zfill(arg0.asInt(0))); 2601 } catch (PyObject.ConversionException e) { 2602 String msg; 2603 switch (e.index) { 2604 case 0: 2605 msg="expected an integer"; 2606 break; 2607 default: 2608 msg="xxx"; 2609 } 2610 throw Py.TypeError(msg); 2611 } 2612 } 2613 2614 } 2615 dict.__setitem__("zfill",new PyMethodDescr("zfill",PyUnicode.class,1,1,new exposed_zfill(null,null))); 2616 dict.__setitem__("__new__",new PyNewWrapper(PyUnicode.class,"__new__",-1,-1) { 2617 2618 public PyObject new_impl(boolean init,PyType subtype,PyObject[]args,String []keywords) { 2619 return unicode_new(this,init,subtype,args,keywords); 2620 } 2621 2622 }); 2623 } 2624 2626 2631 public PyUnicode() { 2633 super(); 2634 } 2635 2636 public PyUnicode(PyType subType) { 2637 super(subType); 2638 } 2639 2640 public PyUnicode(String string) { 2641 super(string); 2642 } 2643 2644 public PyUnicode(PyString pystring) { 2645 this((String )pystring.__tojava__(String .class)); 2646 } 2647 2648 public PyUnicode(char c) { 2649 super(c); 2650 } 2651 2652 final static PyObject unicode_new(PyObject new_, boolean init, PyType subtype, 2653 PyObject[] args, String [] keywords) { 2654 ArgParser ap = new ArgParser("unicode", args, keywords, new String [] { "S", "encoding", "errors" }, 0); 2655 PyObject S = ap.getPyObject(0, null); 2656 String encoding = ap.getString(1, null); 2657 String errors = ap.getString(2, null); 2658 if (S instanceof PyUnicode) { 2659 return S; 2660 } else if (S instanceof PyString) { 2661 return new PyUnicode(codecs.decode((PyString)S, encoding, errors)); 2662 } 2663 2664 return S.__str__(); 2665 } 2666 2667 2668 public static void classDictInit(PyObject dict) throws PyIgnoreMethodTag {} 2669 2670 public String safeRepr() throws PyIgnoreMethodTag { 2671 return "'unicode' object"; 2672 } 2673 2674 public PyString __str__() { 2675 return this; 2676 } 2677 2678 final int unicode___len__() { 2679 return str___len__(); 2680 } 2681 2682 public String unicode_toString() { 2683 return str_toString(); 2684 } 2685 2686 final int unicode___cmp__(PyObject other) { 2687 return str___cmp__(other); 2688 } 2689 2690 final PyObject unicode___eq__(PyObject other) { 2691 return str___eq__(other); 2692 } 2693 2694 final PyObject unicode___ne__(PyObject other) { 2695 return str___ne__(other); 2696 } 2697 2698 final int unicode_hashCode() { 2699 return str_hashCode(); 2700 } 2701 2702 protected PyObject pyget(int i) { 2703 return super.pyget(i); 2705 } 2706 2707 final boolean unicode___contains__(PyObject o) { 2708 return str___contains__(o); 2709 } 2710 2711 final PyObject unicode___mul__(PyObject o) { 2712 return str___mul__(o); 2713 } 2714 2715 final PyObject unicode___rmul__(PyObject o) { 2716 return str___rmul__(o); 2717 } 2718 2719 final PyObject unicode___add__(PyObject generic_other) { 2720 return str___add__(generic_other); 2721 } 2722 2723 final String unicode_lower() { 2724 return str_lower(); 2725 } 2726 2727 final String unicode_upper() { 2728 return str_upper(); 2729 } 2730 2731 final String unicode_title() { 2732 return str_title(); 2733 } 2734 2735 final String unicode_swapcase() { 2736 return str_swapcase(); 2737 } 2738 2739 final String unicode_strip() { 2740 return str_strip(); 2741 } 2742 2743 final String unicode_strip(String sep) { 2744 return str_strip(sep); 2745 } 2746 2747 final String unicode_lstrip() { 2748 return str_lstrip(); 2749 } 2750 2751 final String unicode_lstrip(String sep) { 2752 return str_lstrip(sep); 2753 } 2754 2755 final String unicode_rstrip() { 2756 return str_rstrip(); 2757 } 2758 2759 final String unicode_rstrip(String sep) { 2760 return str_rstrip(sep); 2761 } 2762 2763 2764 final PyList unicode_split() { 2765 return str_split(); 2766 } 2767 2768 final PyList unicode_split(String sep) { 2769 return str_split(sep); 2770 } 2771 2772 final PyList unicode_split(String sep, int maxsplit) { 2773 return str_split(sep, maxsplit); 2774 } 2775 2776 final PyList unicode_splitlines() { 2777 return str_splitlines(); 2778 } 2779 2780 final PyList unicode_splitlines(boolean keepends) { 2781 return str_splitlines(keepends); 2782 } 2783 2784 final int unicode_index(String sub) { 2785 return str_index(sub); 2786 } 2787 2788 final int unicode_index(String sub, int start) { 2789 return str_index(sub, start); 2790 } 2791 2792 final int unicode_index(String sub, int start, int end) { 2793 return str_index(sub, start, end); 2794 } 2795 2796 final int unicode_rindex(String sub) { 2797 return str_rindex(sub); 2798 } 2799 2800 final int unicode_rindex(String sub, int start) { 2801 return str_rindex(sub, start); 2802 } 2803 2804 final int unicode_rindex(String sub, int start, int end) { 2805 return str_rindex(sub, start, end); 2806 } 2807 2808 final int unicode_count(String sub) { 2809 return str_count(sub); 2810 } 2811 2812 final int unicode_count(String sub, int start) { 2813 return str_count(sub, start); 2814 } 2815 2816 final int unicode_count(String sub, int start, int end) { 2817 return str_count(sub, start, end); 2818 } 2819 2820 final int unicode_find(String sub) { 2821 return str_find(sub); 2822 } 2823 2824 final int unicode_find(String sub, int start) { 2825 return str_find(sub, start); 2826 } 2827 2828 final int unicode_find(String sub, int start, int end) { 2829 return str_find(sub, start, end); 2830 } 2831 2832 final int unicode_rfind(String sub) { 2833 return str_rfind(sub); 2834 } 2835 2836 final int unicode_rfind(String sub, int start) { 2837 return str_rfind(sub, start); 2838 } 2839 2840 final int unicode_rfind(String sub, int start, int end) { 2841 return str_rfind(sub, start, end); 2842 } 2843 2844 final String unicode_ljust(int width) { 2845 return str_ljust(width); 2846 } 2847 2848 final String unicode_rjust(int width) { 2849 return str_rjust(width); 2850 } 2851 2852 final String unicode_center(int width) { 2853 return str_center(width); 2854 } 2855 2856 final String unicode_zfill(int width) { 2857 return str_zfill(width); 2858 } 2859 2860 final String unicode_expandtabs() { 2861 return str_expandtabs(); 2862 } 2863 2864 final String unicode_expandtabs(int tabsize) { 2865 return str_expandtabs(tabsize); 2866 } 2867 2868 final String unicode_capitalize() { 2869 return str_capitalize(); 2870 } 2871 2872 final String unicode_replace(String oldPiece, String newPiece) { 2873 return str_replace(oldPiece, newPiece); 2874 } 2875 2876 final String unicode_replace(String oldPiece, String newPiece, int maxsplit) { 2877 return str_replace(oldPiece, newPiece, maxsplit); 2878 } 2879 2880 final String unicode_join(PyObject seq) { 2881 return str_join(seq); 2882 } 2883 2884 final boolean unicode_startswith(String prefix) { 2885 return str_startswith(prefix); 2886 } 2887 2888 final boolean unicode_startswith(String prefix, int offset) { 2889 return str_startswith(prefix, offset); 2890 } 2891 2892 final boolean unicode_startswith(String prefix, int start, int end) { 2893 return str_startswith(prefix, start, end); 2894 } 2895 2896 final boolean unicode_endswith(String suffix) { 2897 return str_endswith(suffix); 2898 } 2899 2900 final boolean unicode_endswith(String suffix, int start) { 2901 return str_endswith(suffix, start); 2902 } 2903 2904 final boolean unicode_endswith(String suffix, int start, int end) { 2905 return str_endswith(suffix, start, end); 2906 } 2907 2908 final String unicode_translate(String table) { 2909 return str_translate(table); 2910 } 2911 2912 final String unicode_translate(String table, String deletechars) { 2913 return str_translate(table, deletechars); 2914 } 2915 2916 final boolean unicode_islower() { 2917 return str_islower(); 2918 } 2919 2920 final boolean unicode_isupper() { 2921 return str_isupper(); 2922 } 2923 2924 final boolean unicode_isalpha() { 2925 return str_isalpha(); 2926 } 2927 2928 final boolean unicode_isalnum() { 2929 return str_isalnum(); 2930 } 2931 2932 final boolean unicode_isdecimal() { 2933 return str_isdecimal(); 2934 } 2935 2936 final boolean unicode_isdigit() { 2937 return str_isdigit(); 2938 } 2939 2940 final boolean unicode_isnumeric() { 2941 return str_isnumeric(); 2942 } 2943 2944 final boolean unicode_istitle() { 2945 return str_istitle(); 2946 } 2947 2948 final boolean unicode_isspace() { 2949 return str_isspace(); 2950 } 2951 2952 final boolean unicode_isunicode() { 2953 return true; 2954 } 2955 2956 final String unicode_encode() { 2957 return str_encode(); 2958 } 2959 2960 final String unicode_encode(String encoding) { 2961 return str_encode(); 2962 } 2963 2964 final String unicode_encode(String encoding, String errors) { 2965 return str_encode(); 2966 } 2967 2968 final String unicode_decode() { 2969 return str_decode(); 2970 } 2971 2972 final String unicode_decode(String encoding) { 2973 return str_decode(encoding); 2974 } 2975 2976 final String unicode_decode(String encoding, String errors) { 2977 return str_decode(encoding, errors); 2978 } 2979} 2980 | Popular Tags |