diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-01-21 17:50:46 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-01-21 17:50:46 +0000 |
commit | e287d5554fab7558c9ac76b0568d5dc4450c480d (patch) | |
tree | 086733c88fbbff6a7d4196d76365eac23f13ffc4 /java/test/Ice/operations/MyDerivedClassI.java | |
parent | Simplify (diff) | |
download | ice-e287d5554fab7558c9ac76b0568d5dc4450c480d.tar.bz2 ice-e287d5554fab7558c9ac76b0568d5dc4450c480d.tar.xz ice-e287d5554fab7558c9ac76b0568d5dc4450c480d.zip |
adding server; removing wstring
Diffstat (limited to 'java/test/Ice/operations/MyDerivedClassI.java')
-rw-r--r-- | java/test/Ice/operations/MyDerivedClassI.java | 346 |
1 files changed, 346 insertions, 0 deletions
diff --git a/java/test/Ice/operations/MyDerivedClassI.java b/java/test/Ice/operations/MyDerivedClassI.java new file mode 100644 index 00000000000..415a1e8928d --- /dev/null +++ b/java/test/Ice/operations/MyDerivedClassI.java @@ -0,0 +1,346 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +public final class MyDerivedClassI extends Test.MyDerivedClass +{ + public + MyDerivedClassI(Ice.ObjectAdapter adapter, Ice.Identity identity) + { + _adapter = adapter; + _identity = identity; + } + + public boolean + opBool(boolean p1, boolean p2, Ice.BooleanHolder p3, Ice.Current current) + { + p3.value = p1; + return p2; + } + + public boolean[] + opBoolS(boolean[] p1, boolean[] p2, Test.BoolSHolder p3, + Ice.Current current) + { + p3.value = new boolean[p1.length + p2.length]; + System.arraycopy(p1, 0, p3.value, 0, p1.length); + System.arraycopy(p2, 0, p3.value, p1.length, p2.length); + + boolean[] r = new boolean[p1.length]; + for (int i = 0; i < p1.length; i++) + { + r[i] = p1[p1.length - (i + 1)]; + } + return r; + } + + public boolean[][] + opBoolSS(boolean[][] p1, boolean[][] p2, Test.BoolSSHolder p3, + Ice.Current current) + { + p3.value = new boolean[p1.length + p2.length][]; + System.arraycopy(p1, 0, p3.value, 0, p1.length); + System.arraycopy(p2, 0, p3.value, p1.length, p2.length); + + boolean[][] r = new boolean[p1.length][]; + for (int i = 0; i < p1.length; i++) + { + r[i] = p1[p1.length - (i + 1)]; + } + return r; + } + + public byte + opByte(byte p1, byte p2, Ice.ByteHolder p3, Ice.Current current) + { + p3.value = (byte)(p1 ^ p2); + return p1; + } + + public java.util.Map + opByteBoolD(java.util.Map p1, java.util.Map p2, Test.ByteBoolDHolder p3, + Ice.Current current) + { + p3.value = p1; + java.util.Map r = new java.util.HashMap(); + r.putAll(p1); + r.putAll(p2); + return r; + } + + public byte[] + opByteS(byte[] p1, byte[] p2, Test.ByteSHolder p3, Ice.Current current) + { + p3.value = new byte[p1.length]; + for (int i = 0; i < p1.length; i++) + { + p3.value[i] = p1[p1.length - (i + 1)]; + } + + byte[] r = new byte[p1.length + p2.length]; + System.arraycopy(p1, 0, r, 0, p1.length); + System.arraycopy(p2, 0, r, p1.length, p2.length); + return r; + } + + public byte[][] + opByteSS(byte[][] p1, byte[][] p2, Test.ByteSSHolder p3, + Ice.Current current) + { + p3.value = new byte[p1.length][]; + for (int i = 0; i < p1.length; i++) + { + p3.value[i] = p1[p1.length - (i + 1)]; + } + + byte[][] r = new byte[p1.length + p2.length][]; + System.arraycopy(p1, 0, r, 0, p1.length); + System.arraycopy(p2, 0, r, p1.length, p2.length); + return r; + } + + public java.util.Map + opDoubleStringD(java.util.Map p1, java.util.Map p2, + Test.DoubleStringDHolder p3, Ice.Current current) + { + p3.value = p1; + java.util.Map r = new java.util.HashMap(); + r.putAll(p1); + r.putAll(p2); + return r; + } + + public double + opFloatDouble(float p1, double p2, Ice.FloatHolder p3, + Ice.DoubleHolder p4, Ice.Current current) + { + p3.value = p1; + p4.value = p2; + return p2; + } + + public double[] + opFloatDoubleS(float[] p1, double[] p2, Test.FloatSHolder p3, + Test.DoubleSHolder p4, Ice.Current current) + { + p3.value = p1; + p4.value = new double[p2.length]; + for (int i = 0; i < p2.length; i++) + { + p4.value[i] = p2[p2.length - (i + 1)]; + } + double[] r = new double[p2.length + p1.length]; + System.arraycopy(p2, 0, r, 0, p2.length); + for (int i = 0; i < p1.length; i++) + { + r[p2.length + i] = p1[i]; + } + return r; + } + + public double[][] + opFloatDoubleSS(float[][] p1, double[][] p2, Test.FloatSSHolder p3, + Test.DoubleSSHolder p4, Ice.Current current) + { + p3.value = p1; + p4.value = new double[p2.length][]; + for (int i = 0; i < p2.length; i++) + { + p4.value[i] = p2[p2.length - (i + 1)]; + } + double[][] r = new double[p2.length * 2][]; + System.arraycopy(p2, 0, r, 0, p2.length); + System.arraycopy(p2, 0, r, p2.length, p2.length); + return r; + } + + public java.util.Map + opLongFloatD(java.util.Map p1, java.util.Map p2, Test.LongFloatDHolder p3, + Ice.Current current) + { + p3.value = p1; + java.util.Map r = new java.util.HashMap(); + r.putAll(p1); + r.putAll(p2); + return r; + } + + public Test.MyClassPrx + opMyClass(Test.MyClassPrx p1, Test.MyClassPrxHolder p2, + Test.MyClassPrxHolder p3, Ice.Current current) + { + p2.value = p1; + p3.value = Test.MyClassPrxHelper.uncheckedCast( + _adapter.createProxy(Ice.Util.stringToIdentity("noSuchIdentity"))); + return Test.MyClassPrxHelper.uncheckedCast( + _adapter.createProxy(_identity)); + } + + public java.util.Map + opMyClassStringD(java.util.Map p1, java.util.Map p2, + Test.MyClassStringDHolder p3, Ice.Current current) + { + p3.value = p1; + java.util.Map r = new java.util.HashMap(); + r.putAll(p1); + r.putAll(p2); + return r; + } + + public Test.MyEnum + opMyEnum(Test.MyEnum p1, Test.MyEnumHolder p2, Ice.Current current) + { + p2.value = p1; + return Test.MyEnum.enum3; + } + + public java.util.Map + opShortIntD(java.util.Map p1, java.util.Map p2, Test.ShortIntDHolder p3, + Ice.Current current) + { + p3.value = p1; + java.util.Map r = new java.util.HashMap(); + r.putAll(p1); + r.putAll(p2); + return r; + } + + public long + opShortIntLong(short p1, int p2, long p3, Ice.ShortHolder p4, + Ice.IntHolder p5, Ice.LongHolder p6, Ice.Current current) + { + p4.value = p1; + p5.value = p2; + p6.value = p3; + return p3; + } + + public long[] + opShortIntLongS(short[] p1, int[] p2, long[] p3, Test.ShortSHolder p4, + Test.IntSHolder p5, Test.LongSHolder p6, + Ice.Current current) + { + p4.value = p1; + p5.value = new int[p2.length]; + for (int i = 0; i < p2.length; i++) + { + p5.value[i] = p2[p2.length - (i + 1)]; + } + p6.value = new long[p3.length * 2]; + System.arraycopy(p3, 0, p6.value, 0, p3.length); + System.arraycopy(p3, 0, p6.value, p3.length, p3.length); + return p3; + } + + public long[][] + opShortIntLongSS(short[][] p1, int[][] p2, long[][] p3, + Test.ShortSSHolder p4, Test.IntSSHolder p5, + Test.LongSSHolder p6, Ice.Current current) + { + p4.value = p1; + p5.value = new int[p2.length][]; + for (int i = 0; i < p2.length; i++) + { + p5.value[i] = p2[p2.length - (i + 1)]; + } + p6.value = new long[p3.length * 2][]; + System.arraycopy(p3, 0, p6.value, 0, p3.length); + System.arraycopy(p3, 0, p6.value, p3.length, p3.length); + return p3; + } + + public String + opString(String p1, String p2, Ice.StringHolder p3, Ice.Current current) + { + p3.value = p2 + " " + p1; + return p1 + " " + p2; + } + + public java.util.Map + opStringMyEnumD(java.util.Map p1, java.util.Map p2, + Test.StringMyEnumDHolder p3, Ice.Current current) + { + p3.value = p1; + java.util.Map r = new java.util.HashMap(); + r.putAll(p1); + r.putAll(p2); + return r; + } + + public String[] + opStringS(String[] p1, String[] p2, Test.StringSHolder p3, + Ice.Current current) + { + p3.value = new String[p1.length + p2.length]; + System.arraycopy(p1, 0, p3.value, 0, p1.length); + System.arraycopy(p2, 0, p3.value, p1.length, p2.length); + + String[] r = new String[p1.length]; + for (int i = 0; i < p1.length; i++) + { + r[i] = p1[p1.length - (i + 1)]; + } + return r; + } + + public String[][] + opStringSS(String[][] p1, String[][] p2, Test.StringSSHolder p3, + Ice.Current current) + { + p3.value = new String[p1.length + p2.length][]; + System.arraycopy(p1, 0, p3.value, 0, p1.length); + System.arraycopy(p2, 0, p3.value, p1.length, p2.length); + + String[][] r = new String[p2.length][]; + for (int i = 0; i < p2.length; i++) + { + r[i] = p2[p2.length - (i + 1)]; + } + return r; + } + + public java.util.Map + opStringStringD(java.util.Map p1, java.util.Map p2, + Test.StringStringDHolder p3, Ice.Current current) + { + p3.value = p1; + java.util.Map r = new java.util.HashMap(); + r.putAll(p1); + r.putAll(p2); + return r; + } + + public Test.Struct + opStruct(Test.Struct p1, Test.Struct p2, Test.StructHolder p3, + Ice.Current current) + { + p3.value = p1; + p3.value.s.s = "a new string"; + return p2; + } + + public void + opVoid(Ice.Current current) + { + } + + public void + shutdown(Ice.Current current) + { + _adapter.getCommunicator().shutdown(); + } + + public void + opDerived(Ice.Current current) + { + } + + private Ice.ObjectAdapter _adapter; + private Ice.Identity _identity; +} |