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