1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342
|
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
package com.sun.star.comp.bridge;
import com.sun.star.comp.loader.FactoryHelper;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.test.performance.ComplexTypes;
import com.sun.star.test.performance.XPerformanceTest;
import test.testtools.bridgetest.BadConstructorArguments;
import test.testtools.bridgetest.Constructors;
import test.testtools.bridgetest.Constructors2;
import test.testtools.bridgetest.TestDataElements;
import test.testtools.bridgetest.TestElement;
import test.testtools.bridgetest.TestEnum;
import test.testtools.bridgetest.TestPolyStruct;
import test.testtools.bridgetest.TestPolyStruct2;
import test.testtools.bridgetest.TestStruct;
import test.testtools.bridgetest.SmallStruct;
import test.testtools.bridgetest.MediumStruct;
import test.testtools.bridgetest.BigStruct;
import test.testtools.bridgetest.TwoFloats;
import test.testtools.bridgetest.FourFloats;
import test.testtools.bridgetest.MixedFloatAndInteger;
import test.testtools.bridgetest.ThreeByteStruct;
import test.testtools.bridgetest.XBridgeTest;
import test.testtools.bridgetest.XBridgeTest2;
import test.testtools.bridgetest.XCurrentContextChecker;
import test.testtools.bridgetest.XMulti;
import test.testtools.bridgetest.XRecursiveCall;
import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.registry.XRegistryKey;
import com.sun.star.uno.Any;
import com.sun.star.uno.Type;
import com.sun.star.uno.XComponentContext;
import com.sun.star.uno.XInterface;
@SuppressWarnings("unchecked")
public class TestComponent {
public static final boolean DEBUG = false;
public static class _PerformancTestObject implements XPerformanceTest, XServiceInfo, XTypeProvider {
private static final String __serviceName = "com.sun.star.comp.benchmark.JavaTestObject";
private int _long;
private long _hyper;
private float _float;
private double _double;
private String _string = "";
private Object _xInterface;
private Object _any;
private Object _interface_sequence[] = new Object[0];
private ComplexTypes _complexTypes = new ComplexTypes();
// Attributes
public int getLong_attr() throws com.sun.star.uno.RuntimeException {
return _long;
}
public void setLong_attr( int _long_attr ) throws com.sun.star.uno.RuntimeException {
_long = _long_attr;
}
public long getHyper_attr() throws com.sun.star.uno.RuntimeException {
return _hyper;
}
public void setHyper_attr( long _hyper_attr ) throws com.sun.star.uno.RuntimeException {
_hyper = _hyper_attr;
}
public float getFloat_attr() throws com.sun.star.uno.RuntimeException {
return _float;
}
public void setFloat_attr( float _float_attr ) throws com.sun.star.uno.RuntimeException {
_float = _float_attr;
}
public double getDouble_attr() throws com.sun.star.uno.RuntimeException {
return _double;
}
public void setDouble_attr( double _double_attr ) throws com.sun.star.uno.RuntimeException {
_double = _double_attr;
}
public String getString_attr() throws com.sun.star.uno.RuntimeException {
return _string;
}
public void setString_attr( String _string_attr ) throws com.sun.star.uno.RuntimeException {
_string = _string_attr;
}
public Object getInterface_attr() throws com.sun.star.uno.RuntimeException {
return _xInterface;
}
public void setInterface_attr( java.lang.Object _interface_attr ) throws com.sun.star.uno.RuntimeException {
_xInterface = _interface_attr;
}
public Object getAny_attr() throws com.sun.star.uno.RuntimeException {
return _any;
}
public void setAny_attr(Object _any_attr ) throws com.sun.star.uno.RuntimeException {
_any = _any_attr;
}
public Object[] getSequence_attr() throws com.sun.star.uno.RuntimeException {
return _interface_sequence;
}
public void setSequence_attr(Object[] _sequence_attr ) throws com.sun.star.uno.RuntimeException {
_interface_sequence = _sequence_attr;
}
public ComplexTypes getStruct_attr() throws com.sun.star.uno.RuntimeException {
return _complexTypes;
}
public void setStruct_attr( ComplexTypes _struct_attr ) throws com.sun.star.uno.RuntimeException {
_complexTypes = _struct_attr;
}
// Methods
public void async() throws com.sun.star.uno.RuntimeException {
}
public void sync( ) throws com.sun.star.uno.RuntimeException {
}
public ComplexTypes complex_in( /*IN*/ComplexTypes aVal ) throws com.sun.star.uno.RuntimeException {
return aVal;
}
public ComplexTypes complex_inout( /*INOUT*/ComplexTypes[] aVal ) throws com.sun.star.uno.RuntimeException {
return aVal[0];
}
public void complex_oneway( /*IN*/ComplexTypes aVal ) throws com.sun.star.uno.RuntimeException {
}
public void complex_noreturn( /*IN*/ComplexTypes aVal ) throws com.sun.star.uno.RuntimeException {
}
public XPerformanceTest createObject( ) throws com.sun.star.uno.RuntimeException {
return new _PerformancTestObject();
}
public int getLong() throws com.sun.star.uno.RuntimeException {
return _long;
}
public void setLong(/*IN*/int n) throws com.sun.star.uno.RuntimeException {
_long = n;
}
public long getHyper() throws com.sun.star.uno.RuntimeException {
return _hyper;
}
public void setHyper(/*IN*/long n) throws com.sun.star.uno.RuntimeException {
_hyper = n;
}
public float getFloat() throws com.sun.star.uno.RuntimeException {
return _float;
}
public void setFloat( /*IN*/float f ) throws com.sun.star.uno.RuntimeException {
_float = f;
}
public double getDouble( ) throws com.sun.star.uno.RuntimeException {
return _double;
}
public void setDouble( /*IN*/double f ) throws com.sun.star.uno.RuntimeException {
_double = f;
}
public String getString( ) throws com.sun.star.uno.RuntimeException {
return _string;
}
public void setString( /*IN*/String s ) throws com.sun.star.uno.RuntimeException {
_string = s;
}
public Object getInterface( ) throws com.sun.star.uno.RuntimeException {
return _xInterface;
}
public void setInterface( /*IN*/Object x ) throws com.sun.star.uno.RuntimeException {
_xInterface = x;
}
public Object getAny( ) throws com.sun.star.uno.RuntimeException {
return _any;
}
public void setAny( /*IN*/java.lang.Object a ) throws com.sun.star.uno.RuntimeException {
_any = a;
}
public Object[] getSequence( ) throws com.sun.star.uno.RuntimeException {
return _interface_sequence;
}
public void setSequence( /*IN*/Object[] seq ) throws com.sun.star.uno.RuntimeException {
if(DEBUG) System.err.println("#### " + getClass().getName() + ".setSequence:" + seq);
_interface_sequence = seq;
}
public ComplexTypes getStruct( ) throws com.sun.star.uno.RuntimeException {
return _complexTypes;
}
public void setStruct( /*IN*/ComplexTypes c ) throws com.sun.star.uno.RuntimeException {
_complexTypes = c;
}
public void raiseRuntimeException( ) throws com.sun.star.uno.RuntimeException {
throw new com.sun.star.uno.RuntimeException();
}
// XServiceInfo
public String getImplementationName() throws com.sun.star.uno.RuntimeException {
return __serviceName;
}
public boolean supportsService(String rServiceName) throws com.sun.star.uno.RuntimeException {
String rSNL[] = getSupportedServiceNames();
for(int nPos = rSNL.length; (nPos--) != 0;) {
if (rSNL[nPos].equals(rServiceName))
return true;
}
return false;
}
public String [] getSupportedServiceNames() throws com.sun.star.uno.RuntimeException {
return new String[]{__serviceName};
}
// XTypeProvider
public Type[] getTypes() throws com.sun.star.uno.RuntimeException {
try {
return new Type[]{new Type(XPerformanceTest.class), new Type(XServiceInfo.class), new Type(XTypeProvider.class)};
}
catch(Exception exception) {
throw new com.sun.star.uno.RuntimeException(exception);
}
}
public byte[] getImplementationId() throws com.sun.star.uno.RuntimeException {
return new byte[0];
}
}
public static class _TestObject implements XBridgeTest2, XRecursiveCall, XServiceInfo, XTypeProvider {
private static final String __serviceName = "com.sun.star.test.bridge.JavaTestObject";
private boolean _bool;
private char _char;
private byte _byte;
private short _short;
private short _ushort;
private int _long;
private int _ulong;
private long _hyper;
private long _uhyper;
private float _float;
private double _double;
private String _string;
private byte _byte2;
private short _short2;
private Object _xInterface;
private Object _any;
private TestEnum _testEnum = TestEnum.TEST;
private TestElement _testElements[] = new TestElement[0];
private TestDataElements _testDataElements = new TestDataElements();
private int _nLastCallId;
private boolean _bFirstCall;
private boolean _bSequenceOfCallTestPassed;
private boolean[] arBool;
private char[] arChar;
private byte[] arByte;
private short[] arShort;
private short[] arUShort;
private int[] arLong;
private int[] arULong;
private long[] arHyper;
private long[] arUHyper;
private float[] arFloat;
private double[] arDouble;
private String[] arString;
private Object[] arObject;
private Object[] arAny;
private TestEnum[] arEnum;
private int[][] arLong2;
private int[][][] arLong3;
public _TestObject(XMultiServiceFactory xMultiServiceFactory) {
if(DEBUG) System.err.println("##### " + getClass().getName() + ".<init> " + xMultiServiceFactory);
_nLastCallId = 0;
_bFirstCall = true;
_bSequenceOfCallTestPassed = true;
}
public void setValues(boolean bBool,
char cChar,
byte nByte,
short nShort,
short nUShort,
int nLong,
int nULong,
long nHyper,
long nUHyper,
float fFloat,
double fDouble,
TestEnum testEnum,
String string,
byte nByte2,
short nShort2,
Object xInterface,
Object any,
TestElement testElements[],
TestDataElements testDataElements) throws com.sun.star.uno.RuntimeException
{
if(DEBUG) System.err.println("##### " + getClass().getName() + ".setValues:" + any);
_bool = bBool;
_char = cChar;
_byte = nByte;
_short = nShort;
_ushort = nUShort;
_long = nLong;
_ulong = nULong;
_hyper = nHyper;
_uhyper = nUHyper;
_float = fFloat;
_double = fDouble;
_testEnum = testEnum;
_string = string;
_byte2 = nByte2;
_short2 = nShort2;
_xInterface = xInterface;
_any = any;
_testElements = testElements;
_testDataElements = testDataElements;
}
public TestDataElements setValues2(/*INOUT*/boolean[] io_bool,
/*INOUT*/char[] io_char,
/*INOUT*/byte[] io_byte,
/*INOUT*/short[] io_short,
/*INOUT*/short[] io_ushort,
/*INOUT*/int[] io_long,
/*INOUT*/int[] io_ulong,
/*INOUT*/long[] io_hyper,
/*INOUT*/long[] io_uhyper,
/*INOUT*/float[] io_float,
/*INOUT*/double[] io_double,
/*INOUT*/TestEnum[] io_testEnum,
/*INOUT*/String[] io_string,
/*INOUT*/byte[] io_byte2,
/*INOUT*/short[] io_short2,
/*INOUT*/Object[] io_xInterface,
/*INOUT*/Object[] io_any,
/*INOUT*/TestElement[][] io_testElements,
/*INOUT*/TestDataElements[] io_testDataElements) throws com.sun.star.uno.RuntimeException
{
if(DEBUG) System.err.println("##### " + getClass().getName() + ".setValues2:" + io_any[0]);
_bool = io_bool[0];
_char = io_char[0];
_byte = io_byte[0];
_short = io_short[0];
_ushort = io_ushort[0];
_long = io_long[0];
_ulong = io_ulong[0];
_hyper = io_hyper[0];
_uhyper = io_uhyper[0];
_float = io_float[0];
_double = io_double[0];
_testEnum = io_testEnum[0];
_string = io_string[0];
_byte2 = io_byte2[0];
_short2 = io_short2[0];
_xInterface = io_xInterface[0];
_any = io_any[0];
_testElements = io_testElements[0];
_testDataElements = io_testDataElements[0];
io_testElements[ 0 ] =
new TestElement [] { io_testElements[ 0 ][ 1 ], io_testElements[ 0 ][ 0 ] };
return _testDataElements;
}
public TestDataElements getValues(/*OUT*/boolean[] o_bool,
/*OUT*/char[] o_char,
/*OUT*/byte[] o_byte,
/*OUT*/short[] o_short,
/*OUT*/short[] o_ushort,
/*OUT*/int[] o_long,
/*OUT*/int[] o_ulong,
/*OUT*/long[] o_hyper,
/*OUT*/long[] o_uhyper,
/*OUT*/float[] o_float,
/*OUT*/double[] o_double,
/*OUT*/TestEnum[] o_testEnum,
/*OUT*/String[] o_string,
/*OUT*/byte[] o_byte2,
/*OUT*/short[] o_short2,
/*OUT*/Object[] o_xInterface,
/*OUT*/Object[] o_any,
/*OUT*/TestElement[][] o_testElements,
/*OUT*/TestDataElements[] o_testDataElements) throws com.sun.star.uno.RuntimeException
{
if(DEBUG) System.err.println("##### " + getClass().getName() + ".getValues:" + _any);
o_bool[0] = _bool;
o_char[0] = _char;
o_byte[0] = _byte;
o_short[0] = _short;
o_ushort[0] = _ushort;
o_long[0] = _long;
o_ulong[0] = _ulong;
o_hyper[0] = _hyper;
o_uhyper[0] = _uhyper;
o_float[0] = _float;
o_double[0] = _double;
o_testEnum[0] = _testEnum;
o_string[0] = _string;
o_byte2[0] = _byte2;
o_short2[0] = _short2;
o_xInterface[0] = _xInterface;
o_any[0] = _any;
o_testElements[0] = _testElements;
o_testDataElements[0] = _testDataElements;
return _testDataElements;
}
public SmallStruct echoSmallStruct( SmallStruct i_Struct) throws com.sun.star.uno.RuntimeException {
return i_Struct;
}
public MediumStruct echoMediumStruct( MediumStruct i_Struct) throws com.sun.star.uno.RuntimeException {
return i_Struct;
}
public BigStruct echoBigStruct( BigStruct i_Struct) throws com.sun.star.uno.RuntimeException {
return i_Struct;
}
public TwoFloats echoTwoFloats( TwoFloats i_Struct) throws com.sun.star.uno.RuntimeException {
return i_Struct;
}
public FourFloats echoFourFloats( FourFloats i_Struct) throws com.sun.star.uno.RuntimeException {
return i_Struct;
}
public MixedFloatAndInteger echoMixedFloatAndInteger( MixedFloatAndInteger i_Struct) throws com.sun.star.uno.RuntimeException {
return i_Struct;
}
public ThreeByteStruct echoThreeByteStruct( ThreeByteStruct i_Struct) throws com.sun.star.uno.RuntimeException {
return i_Struct;
}
public int testPPCAlignment( long l1, long l2, int i1, long l3, int i2 ) throws com.sun.star.uno.RuntimeException {
return i2;
}
public int testPPC64Alignment( double d1, double d2, double d3, int i1 ) throws com.sun.star.uno.RuntimeException {
return i1;
}
public double testTenDoubles( double d1, double d2, double d3, double d4, double d5, double d6, double d7, double d8, double d9, double d10 ) {
return d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10;
}
// Attributes
public boolean getBool() throws com.sun.star.uno.RuntimeException {
return _bool;
}
public void setBool(boolean bool) throws com.sun.star.uno.RuntimeException {
_bool = bool;
}
public byte getByte() throws com.sun.star.uno.RuntimeException {
return _byte;
}
public void setByte(byte zbyte) throws com.sun.star.uno.RuntimeException {
_byte = zbyte;
}
public char getChar() throws com.sun.star.uno.RuntimeException {
return _char;
}
public void setChar(char zchar) throws com.sun.star.uno.RuntimeException {
_char = zchar;
}
public short getShort() throws com.sun.star.uno.RuntimeException {
return _short;
}
public void setShort(short zshort) throws com.sun.star.uno.RuntimeException {
_short = zshort;
}
public short getUShort() throws com.sun.star.uno.RuntimeException {
return _ushort;
}
public void setUShort(short ushort) throws com.sun.star.uno.RuntimeException {
_ushort = ushort;
}
public int getLong() throws com.sun.star.uno.RuntimeException {
return _long;
}
public void setLong(int zint) throws com.sun.star.uno.RuntimeException {
_long = zint;
}
public int getULong() throws com.sun.star.uno.RuntimeException {
return _ulong;
}
public void setULong(int uint) throws com.sun.star.uno.RuntimeException {
_ulong = uint;
}
public long getHyper() throws com.sun.star.uno.RuntimeException {
return _hyper;
}
public void setHyper(long hyper) throws com.sun.star.uno.RuntimeException {
_hyper = hyper;
}
public long getUHyper() throws com.sun.star.uno.RuntimeException {
return _uhyper;
}
public void setUHyper(long uhyper) throws com.sun.star.uno.RuntimeException {
_uhyper = uhyper;
}
public float getFloat() throws com.sun.star.uno.RuntimeException {
return _float;
}
public void setFloat(float zfloat) throws com.sun.star.uno.RuntimeException {
_float = zfloat;
}
public double getDouble() throws com.sun.star.uno.RuntimeException {
return _double;
}
public void setDouble(double zdouble) throws com.sun.star.uno.RuntimeException {
_double = zdouble;
}
public TestEnum getEnum() throws com.sun.star.uno.RuntimeException {
return _testEnum;
}
public void setEnum(TestEnum testEnum) throws com.sun.star.uno.RuntimeException {
_testEnum = testEnum;
}
public String getString() throws com.sun.star.uno.RuntimeException {
return _string;
}
public void setString(String string) throws com.sun.star.uno.RuntimeException {
_string = string;
}
public byte getByte2() throws com.sun.star.uno.RuntimeException {
return _byte2;
}
public void setByte2(byte zbyte) throws com.sun.star.uno.RuntimeException {
_byte2 = zbyte;
}
public short getShort2() throws com.sun.star.uno.RuntimeException {
return _short2;
}
public void setShort2(short zshort) throws com.sun.star.uno.RuntimeException {
_short2 = zshort;
}
public Object getInterface() throws com.sun.star.uno.RuntimeException {
return _xInterface;
}
public void setInterface(Object zinterface) throws com.sun.star.uno.RuntimeException {
_xInterface = zinterface;
}
public Object getAny() throws com.sun.star.uno.RuntimeException {
if(DEBUG) System.err.println("##### " + getClass().getName() + ".setAny:" + _any);
return _any;
}
public void setAny(Object any) throws com.sun.star.uno.RuntimeException {
if(DEBUG) System.err.println("##### " + getClass().getName() + ".setAny:" + any);
_any = any;
}
public TestElement[] getSequence() throws com.sun.star.uno.RuntimeException {
return _testElements;
}
public void setSequence(TestElement testElements[]) throws com.sun.star.uno.RuntimeException {
_testElements = testElements;
}
public TestDataElements getStruct() throws com.sun.star.uno.RuntimeException {
return _testDataElements;
}
public void setStruct(TestDataElements testDataElements) throws com.sun.star.uno.RuntimeException {
_testDataElements = testDataElements;
}
public int getRaiseAttr1() {
throw new com.sun.star.uno.RuntimeException();
}
public void setRaiseAttr1(int n) throws IllegalArgumentException {
throw new IllegalArgumentException();
}
public int getRaiseAttr2() throws IllegalArgumentException {
throw new IllegalArgumentException();
}
public TestPolyStruct transportPolyBoolean(TestPolyStruct arg) {
Boolean dummy = (Boolean) arg.member;
return arg;
}
public void transportPolyHyper(TestPolyStruct[] arg) {
Long dummy = (Long) arg[0].member;
}
public void transportPolySequence(
TestPolyStruct arg1, TestPolyStruct[] arg2)
{
Object[] dummy = (Object[]) arg1.member;
arg2[0] = arg1;
}
public TestPolyStruct getNullPolyLong() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolyString() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolyType() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolyAny() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolySequence() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolyEnum() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolyBadEnum() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolyStruct() {
return new TestPolyStruct();
}
public TestPolyStruct getNullPolyInterface() {
return new TestPolyStruct();
}
public Object transportAny(Object value) throws com.sun.star.uno.RuntimeException {
return value;
}
public void call(int nCallId , int nWaitMUSEC) throws com.sun.star.uno.RuntimeException {
try {
Thread.sleep(nWaitMUSEC / 10000);
}
catch(InterruptedException interruptedException) {
throw new com.sun.star.uno.RuntimeException(interruptedException);
}
if(_bFirstCall)
_bFirstCall = false;
else
_bSequenceOfCallTestPassed = _bSequenceOfCallTestPassed && (nCallId > _nLastCallId);
_nLastCallId = nCallId;
}
public void callOneway( int nCallId , int nWaitMUSEC ) throws com.sun.star.uno.RuntimeException {
try {
Thread.sleep(nWaitMUSEC / 10000);
}
catch(InterruptedException interruptedException) {
throw new com.sun.star.uno.RuntimeException(interruptedException);
}
_bSequenceOfCallTestPassed = _bSequenceOfCallTestPassed && (nCallId > _nLastCallId);
_nLastCallId = nCallId;
}
public boolean sequenceOfCallTestPassed() throws com.sun.star.uno.RuntimeException {
return _bSequenceOfCallTestPassed;
}
public synchronized void callRecursivly(XRecursiveCall xCall, int nToCall) throws com.sun.star.uno.RuntimeException {
if(nToCall != 0)
{
nToCall --;
xCall.callRecursivly(this , nToCall);
}
}
public synchronized void startRecursiveCall(XRecursiveCall xCall, int nToCall) throws com.sun.star.uno.RuntimeException {
if(nToCall != 0)
{
nToCall --;
xCall.callRecursivly( this , nToCall );
}
}
public XMulti getMulti() {
return new XMulti() {
public double getatt1() {
return attribute1;
}
public void setatt1(double value) {
attribute1 = value;
}
public int fn11(int arg) {
return 11 * arg;
}
public String fn12(String arg) {
return "12" + arg;
}
public int fn21(int arg) {
return 21 * arg;
}
public String fn22(String arg) {
return "22" + arg;
}
public double getatt3() {
return attribute3;
}
public void setatt3(double value) {
attribute3 = value;
}
public int fn31(int arg) {
return 31 * arg;
}
public String fn32(String arg) {
return "32" + arg;
}
public int fn33() {
return 33;
}
public int fn41(int arg) {
return 41 * arg;
}
public int fn61(int arg) {
return 61 * arg;
}
public String fn62(String arg) {
return "62" + arg;
}
public int fn71(int arg) {
return 71 * arg;
}
public String fn72(String arg) {
return "72" + arg;
}
public int fn73() {
return 73;
}
private double attribute1 = 0.0;
private double attribute3 = 0.0;
};
}
private static final class CheckFailed extends Exception {
CheckFailed(String message) {
super(message);
}
}
private static void checkEqual(int value, int argument)
throws CheckFailed
{
if (argument != value) {
throw new CheckFailed(value + " != " + argument);
}
}
private static void checkEqual(double value, double argument)
throws CheckFailed
{
if (argument != value) {
throw new CheckFailed(value + " != " + argument);
}
}
private static void checkEqual(String value, String argument)
throws CheckFailed
{
if (!argument.equals(value)) {
throw new CheckFailed(value + " != " + argument);
}
}
public String testMulti(XMulti multi) {
try {
checkEqual(0.0, multi.getatt1());
multi.setatt1(0.1);
checkEqual(0.1, multi.getatt1());
checkEqual(11 * 1, multi.fn11(1));
checkEqual("12" + "abc", multi.fn12("abc"));
checkEqual(21 * 2, multi.fn21(2));
checkEqual("22" + "de", multi.fn22("de"));
checkEqual(0.0, multi.getatt3());
multi.setatt3(0.3);
checkEqual(0.3, multi.getatt3());
checkEqual(31 * 3, multi.fn31(3));
checkEqual("32" + "f", multi.fn32("f"));
checkEqual(33, multi.fn33());
checkEqual(41 * 4, multi.fn41(4));
checkEqual(61 * 6, multi.fn61(6));
checkEqual("62", multi.fn62(""));
checkEqual(71 * 7, multi.fn71(7));
checkEqual("72" + "g", multi.fn72("g"));
checkEqual(73, multi.fn73());
} catch (CheckFailed f) {
return f.getMessage();
}
return "";
}
// XBridgeTest
public TestDataElements raiseException(short nArgumentPos, String rMsg, Object xContext)
throws com.sun.star.lang.IllegalArgumentException,
com.sun.star.uno.RuntimeException
{
throw new com.sun.star.lang.IllegalArgumentException(rMsg, xContext, nArgumentPos);
}
public void raiseRuntimeExceptionOneway(String rMsg, Object xContext) throws com.sun.star.uno.RuntimeException {
throw new com.sun.star.uno.RuntimeException(rMsg, xContext);
}
private void dothrow( com.sun.star.uno.RuntimeException t )
throws com.sun.star.uno.RuntimeException
{
throw t;
}
public int getRuntimeException()
throws com.sun.star.uno.RuntimeException
{
dothrow( new com.sun.star.uno.RuntimeException(
_string, _xInterface ) );
return 0; // dummy
}
public void setRuntimeException(int _runtimeexception) throws com.sun.star.uno.RuntimeException {
throw new com.sun.star.uno.RuntimeException(_string, _xInterface);
}
// XServiceInfo
public String getImplementationName() throws com.sun.star.uno.RuntimeException {
return __serviceName;
}
public boolean supportsService(String rServiceName) throws com.sun.star.uno.RuntimeException {
String rSNL[] = getSupportedServiceNames();
for(int nPos = rSNL.length; (nPos--) != 0;) {
if (rSNL[nPos].equals(rServiceName))
return true;
}
return false;
}
public String [] getSupportedServiceNames() throws com.sun.star.uno.RuntimeException {
return new String[]{__serviceName};
}
// XTypeProvider
public Type[] getTypes() throws com.sun.star.uno.RuntimeException {
try {
return new Type[]{new Type(XBridgeTest.class), new Type(XRecursiveCall.class), new Type(XServiceInfo.class), new Type(XTypeProvider.class)};
}
catch(Exception exception) {
throw new com.sun.star.uno.RuntimeException(exception);
}
}
public byte[] getImplementationId() throws com.sun.star.uno.RuntimeException {
return new byte[0];
}
//XBridgeTest2
public boolean[] setSequenceBool( /*IN*/boolean[] aSeq )
{
arBool = aSeq;
return aSeq;
}
public char[] setSequenceChar( /*IN*/char[] aSeq )
{
arChar = aSeq;
return aSeq;
}
public byte[] setSequenceByte( /*IN*/byte[] aSeq )
{
arByte = aSeq;
return aSeq;
}
public short[] setSequenceShort( /*IN*/short[] aSeq )
{
arShort = aSeq;
return aSeq;
}
public short[] setSequenceUShort( /*IN*/short[] aSeq )
{
arUShort = aSeq;
return aSeq;
}
public int[] setSequenceLong( /*IN*/int[] aSeq )
{
arLong = aSeq;
return aSeq;
}
public int[] setSequenceULong( /*IN*/int[] aSeq )
{
arULong = aSeq;
return aSeq;
}
public long[] setSequenceHyper( /*IN*/long[] aSeq )
{
arHyper = aSeq;
return aSeq;
}
public long[] setSequenceUHyper( /*IN*/long[] aSeq )
{
arUHyper = aSeq;
return aSeq;
}
public float[] setSequenceFloat( /*IN*/float[] aSeq )
{
arFloat = aSeq;
return aSeq;
}
public double[] setSequenceDouble( /*IN*/double[] aSeq )
{
arDouble = aSeq;
return aSeq;
}
public TestEnum[] setSequenceEnum( /*IN*/TestEnum[] aSeq )
{
arEnum = aSeq;
return aSeq;
}
public String[] setSequenceString( /*IN*/String[] aSeq )
{
arString = aSeq;
return aSeq;
}
public java.lang.Object[] setSequenceXInterface( /*IN*/java.lang.Object[] aSeq )
{
arObject = aSeq;
return aSeq;
}
public java.lang.Object[] setSequenceAny( /*IN*/java.lang.Object[] aSeq )
{
arAny = aSeq;
return aSeq;
}
public TestElement[] setSequenceStruct( /*IN*/TestElement[] aSeq )
{
_testElements = aSeq;
return aSeq;
}
public int[][] setDim2( /*IN*/int[][] aSeq )
{
arLong2 = aSeq;
return aSeq;
}
public int[][][] setDim3( /*IN*/int[][][] aSeq )
{
arLong3 = aSeq;
return aSeq;
}
public void setSequencesInOut( /*INOUT*/boolean[][] aSeqBoolean,
/*INOUT*/char[][] aSeqChar, /*INOUT*/byte[][] aSeqByte,
/*INOUT*/short[][] aSeqShort, /*INOUT*/short[][] aSeqUShort,
/*INOUT*/int[][] aSeqLong, /*INOUT*/int[][] aSeqULong,
/*INOUT*/long[][] aSeqHyper, /*INOUT*/long[][] aSeqUHyper,
/*INOUT*/float[][] aSeqFloat, /*INOUT*/double[][] aSeqDouble,
/*INOUT*/TestEnum[][] aSeqEnum, /*INOUT*/String[][] aSeqString,
/*INOUT*/java.lang.Object[][] aSeqXInterface,
/*INOUT*/java.lang.Object[][] aSeqAny,
/*INOUT*/int[][][] aSeqDim2, /*INOUT*/int[][][][] aSeqDim3 )
{
arBool = aSeqBoolean[0];
arChar = aSeqChar[0];
arByte = aSeqByte[0];
arShort = aSeqShort[0];
arUShort = aSeqUShort[0];
arLong = aSeqLong[0];
arULong = aSeqULong[0];
arFloat = aSeqFloat[0];
arDouble = aSeqDouble[0];
arEnum = aSeqEnum[0];
arString = aSeqString[0];
arObject = aSeqXInterface[0];
arAny = aSeqAny[0];
arLong2 = aSeqDim2[0];
arLong3 = aSeqDim3[0];
}
public void setSequencesOut( /*OUT*/boolean[][] aSeqBoolean, /*OUT*/char[][] aSeqChar,
/*OUT*/byte[][] aSeqByte, /*OUT*/short[][] aSeqShort,
/*OUT*/short[][] aSeqUShort, /*OUT*/int[][] aSeqLong,
/*OUT*/int[][] aSeqULong, /*OUT*/long[][] aSeqHyper,
/*OUT*/long[][] aSeqUHyper, /*OUT*/float[][] aSeqFloat,
/*OUT*/double[][] aSeqDouble, /*OUT*/TestEnum[][] aSeqEnum,
/*OUT*/String[][] aSeqString,
/*OUT*/java.lang.Object[][] aSeqXInterface,
/*OUT*/java.lang.Object[][] aSeqAny, /*OUT*/int[][][] aSeqDim2,
/*OUT*/int[][][][] aSeqDim3 )
{
aSeqBoolean[0] = arBool;
aSeqChar[0] = arChar;
aSeqByte[0] = arByte;
aSeqShort[0] = arShort;
aSeqUShort[0] = arUShort;
aSeqLong[0] = arLong;
aSeqULong[0] = arULong;
aSeqHyper[0] = arHyper;
aSeqUHyper[0] = arUHyper;
aSeqFloat[0] = arFloat;
aSeqDouble[0] = arDouble;
aSeqEnum[0] = arEnum;
aSeqString[0] = arString;
aSeqXInterface[0] = arObject;
aSeqAny[0] = arAny;
aSeqDim2[0] = arLong2;
aSeqDim3[0] = arLong3;
}
public void testConstructorsService(XComponentContext context)
throws BadConstructorArguments
{
Constructors.create1(context,
true,
Byte.MIN_VALUE,
Short.MIN_VALUE,
(short) -1,
Integer.MIN_VALUE,
-1,
Long.MIN_VALUE,
-1L,
0.123f,
0.456,
'X',
"test",
Type.ANY,
new Any(Type.BOOLEAN, Boolean.TRUE),
new boolean[] { true },
new byte[] { Byte.MIN_VALUE },
new short[] { Short.MIN_VALUE },
new short[] { (short) -1 },
new int[] { Integer.MIN_VALUE },
new int[] { -1 },
new long[] { Long.MIN_VALUE },
new long[] { -1L },
new float[] { 0.123f },
new double[] { 0.456 },
new char[] { 'X' },
new String[] { "test" },
new Type[] { Type.ANY },
new Boolean[] { Boolean.TRUE },
new boolean[][] { new boolean[] { true } },
new Object[][] {
new Object[] { new Any(Type.BOOLEAN, Boolean.TRUE) } },
new TestEnum[] { TestEnum.TWO },
new TestStruct[] { new TestStruct(10) },
new TestPolyStruct[] { new TestPolyStruct(Boolean.TRUE) },
new TestPolyStruct[] {
new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE)) },
new Object[] { null },
TestEnum.TWO,
new TestStruct(10),
new TestPolyStruct(Boolean.TRUE),
new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE)),
null);
Constructors.create2(context, new Object[] {
Boolean.TRUE,
Byte.valueOf(Byte.MIN_VALUE),
Short.valueOf(Short.MIN_VALUE),
new Any(Type.UNSIGNED_SHORT, Short.valueOf((short) -1)),
Integer.valueOf(Integer.MIN_VALUE),
new Any(Type.UNSIGNED_LONG, Integer.valueOf(-1)),
Long.valueOf(Long.MIN_VALUE),
new Any(Type.UNSIGNED_HYPER, Long.valueOf(-1L)),
new Float(0.123f),
new Double(0.456),
new Character('X'),
"test",
Type.ANY,
new Any(Type.BOOLEAN, Boolean.TRUE),
new boolean[] { true },
new byte[] { Byte.MIN_VALUE },
new short[] { Short.MIN_VALUE },
new Any(
new Type("[]unsigned short"), new short[] { (short) -1 }),
new int[] { Integer.MIN_VALUE },
new Any(new Type("[]unsigned long"), new int[] { -1 }),
new long[] { Long.MIN_VALUE },
new Any(new Type("[]unsigned hyper"), new long[] { -1L }),
new float[] { 0.123f },
new double[] { 0.456 },
new char[] { 'X' },
new String[] { "test" },
new Type[] { Type.ANY },
new Any(new Type("[]any"), new Boolean[] { Boolean.TRUE }),
new boolean[][] { new boolean[] { true } },
new Object[][] {
new Object[] { new Any(Type.BOOLEAN, Boolean.TRUE) } },
new TestEnum[] { TestEnum.TWO },
new TestStruct[] { new TestStruct(10) },
new Any(
new Type(
"[]test.testtools.bridgetest.TestPolyStruct<boolean>"),
new TestPolyStruct[] { new TestPolyStruct(Boolean.TRUE) }),
new Any(
new Type("[]test.testtools.bridgetest.TestPolyStruct<any>"),
new TestPolyStruct[] {
new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE))
}),
new XInterface[] { null },
TestEnum.TWO,
new TestStruct(10),
new Any(
new Type(
"test.testtools.bridgetest.TestPolyStruct<boolean>"),
new TestPolyStruct(Boolean.TRUE)),
new Any(
new Type("test.testtools.bridgetest.TestPolyStruct<any>"),
new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE))),
null });
Constructors2.create1(
context,
new TestPolyStruct(Type.LONG),
new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE)),
new TestPolyStruct(Boolean.TRUE),
new TestPolyStruct(Byte.valueOf(Byte.MIN_VALUE)),
new TestPolyStruct(Short.valueOf(Short.MIN_VALUE)),
new TestPolyStruct(Integer.valueOf(Integer.MIN_VALUE)),
new TestPolyStruct(Long.valueOf(Long.MIN_VALUE)),
new TestPolyStruct(new Character('X')),
new TestPolyStruct("test"),
new TestPolyStruct(new Float(0.123f)),
new TestPolyStruct(new Double(0.456)),
new TestPolyStruct(new com.sun.star.lib.uno.helper.ComponentBase()),
new TestPolyStruct(new com.sun.star.lib.uno.helper.ComponentBase()),
new TestPolyStruct(TestEnum.TWO),
new TestPolyStruct(new TestPolyStruct2(new Character('X'),
new Any(Type.BOOLEAN, Boolean.TRUE))),
new TestPolyStruct(new TestPolyStruct2(new TestPolyStruct2(
new Character('X'), new Any(Type.BOOLEAN, Boolean.TRUE)), "test")),
new TestPolyStruct2("test", new TestPolyStruct2(new Character('X'),
new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE)))),
new TestPolyStruct2( new TestPolyStruct2(new Character('X'),
new Any(Type.BOOLEAN, Boolean.TRUE)), new TestPolyStruct(new Character('X'))),
new TestPolyStruct(new Type[] { Type.LONG}),
new TestPolyStruct(new Any[] { new Any(Type.BOOLEAN, Boolean.TRUE) }),
new TestPolyStruct(new boolean[] {true}),
new TestPolyStruct(new byte[] {Byte.MIN_VALUE}),
new TestPolyStruct(new short[] {Short.MIN_VALUE}),
new TestPolyStruct(new int[] {Integer.MIN_VALUE}),
new TestPolyStruct(new long[] {Long.MIN_VALUE}),
new TestPolyStruct(new char[] {'X'}),
new TestPolyStruct(new String[] {"test"}),
new TestPolyStruct(new float[] {0.123f}),
new TestPolyStruct(new double[] {0.456d}),
new TestPolyStruct(new Object[] {new com.sun.star.lib.uno.helper.ComponentBase()}),
new TestPolyStruct(new com.sun.star.lang.XComponent[] {new com.sun.star.lib.uno.helper.ComponentBase()}),
new TestPolyStruct(new TestEnum[] {TestEnum.TWO}),
new TestPolyStruct(new TestPolyStruct2[] {new TestPolyStruct2(
new Character('X'), new Any[] {new Any(Type.BOOLEAN, Boolean.TRUE)})}),
new TestPolyStruct(new TestPolyStruct2[] {new TestPolyStruct2(
new TestPolyStruct(new Character('X')), new Any[] {new Any(Type.BOOLEAN, Boolean.TRUE)})}),
new TestPolyStruct(new int[][] { new int[] {Integer.MIN_VALUE} }),
new TestPolyStruct[]{ new TestPolyStruct(Integer.valueOf(Integer.MIN_VALUE))},
new TestPolyStruct[]{new TestPolyStruct(new TestPolyStruct2(
new Character('X'), new Any(Type.BOOLEAN, Boolean.TRUE)))},
new TestPolyStruct[]{new TestPolyStruct(new TestPolyStruct2(
new TestPolyStruct2(new Character('X'), new Any(Type.BOOLEAN, Boolean.TRUE)), "test"))},
new TestPolyStruct2[]{new TestPolyStruct2("test", new TestPolyStruct2(
new Character('X'), new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE))))},
new TestPolyStruct2[]{new TestPolyStruct2(new TestPolyStruct2(new Character('X'), new Any(
Type.BOOLEAN, Boolean.TRUE)),new TestPolyStruct(new Character('X')))},
new TestPolyStruct[][]{new TestPolyStruct[]{new TestPolyStruct(new Character('X'))}},
new TestPolyStruct[][]{new TestPolyStruct[]{
new TestPolyStruct(new TestPolyStruct2(new Character('X'), new Any(Type.BOOLEAN, Boolean.TRUE)))}},
new TestPolyStruct[][]{new TestPolyStruct[] {new TestPolyStruct(new TestPolyStruct2(
new TestPolyStruct2(new Character('X'),new Any(Type.BOOLEAN, Boolean.TRUE)), "test"))}},
new TestPolyStruct2[][]{new TestPolyStruct2[]{new TestPolyStruct2(
"test", new TestPolyStruct2(new Character('X'),new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE))))}},
new TestPolyStruct2[][]{new TestPolyStruct2[]{new TestPolyStruct2(
new TestPolyStruct2(new Character('X'),new Any(Type.BOOLEAN, Boolean.TRUE)),
new TestPolyStruct(new Character('X')))}});
}
public XCurrentContextChecker getCurrentContextChecker() {
return new CurrentContextChecker();
}
}
/**
* Gives a factory for creating the service.
* This method is called by the <code>JavaLoader</code>
* <p>
* @return returns a <code>XSingleServiceFactory</code> for creating the component
* @param implName the name of the implementation for which a service is desired
* @param multiFactory the service manager to be uses if needed
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
public static XSingleServiceFactory __getServiceFactory(String implName,
XMultiServiceFactory multiFactory,
XRegistryKey regKey)
{
XSingleServiceFactory xSingleServiceFactory = null;
if(implName.equals(_TestObject.class.getName()))
xSingleServiceFactory = FactoryHelper.getServiceFactory(_TestObject.class,
_TestObject.__serviceName,
multiFactory,
regKey);
else if(implName.equals(_PerformancTestObject.class.getName()))
xSingleServiceFactory = FactoryHelper.getServiceFactory(_PerformancTestObject.class,
_PerformancTestObject.__serviceName,
multiFactory,
regKey);
return xSingleServiceFactory;
}
}
|