summaryrefslogtreecommitdiff
path: root/java/test/Ice/slicing/exceptions/TestI.java
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-05-13 08:30:12 +0000
committerMichi Henning <michi@zeroc.com>2003-05-13 08:30:12 +0000
commit6df7e3e1bac9aecde5a7f27fe917f38eae3443df (patch)
tree0489325016d3ef0cc5caa104f73865f0595a7890 /java/test/Ice/slicing/exceptions/TestI.java
parentAdded jpg (diff)
downloadice-6df7e3e1bac9aecde5a7f27fe917f38eae3443df.tar.bz2
ice-6df7e3e1bac9aecde5a7f27fe917f38eae3443df.tar.xz
ice-6df7e3e1bac9aecde5a7f27fe917f38eae3443df.zip
Added exception slicing.
Diffstat (limited to 'java/test/Ice/slicing/exceptions/TestI.java')
-rw-r--r--java/test/Ice/slicing/exceptions/TestI.java164
1 files changed, 164 insertions, 0 deletions
diff --git a/java/test/Ice/slicing/exceptions/TestI.java b/java/test/Ice/slicing/exceptions/TestI.java
new file mode 100644
index 00000000000..86eb89f5885
--- /dev/null
+++ b/java/test/Ice/slicing/exceptions/TestI.java
@@ -0,0 +1,164 @@
+// **********************************************************************
+//
+// Copyright (c) 2003
+// ZeroC, Inc.
+// Billerica, MA, USA
+//
+// All Rights Reserved.
+//
+// Ice is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// **********************************************************************
+
+public final class TestI extends _TestDisp
+{
+ public
+ TestI(Ice.ObjectAdapter adapter)
+ {
+ _adapter = adapter;
+ }
+
+ public void
+ shutdown(Ice.Current current)
+ {
+ _adapter.getCommunicator().shutdown();
+ }
+
+ public void
+ baseAsBase(Ice.Current current)
+ throws Base
+ {
+ Base b = new Base();
+ b.b = "Base.b";
+ throw b;
+ }
+
+ public void
+ unknownDerivedAsBase(Ice.Current current)
+ throws Base
+ {
+ UnknownDerived d = new UnknownDerived();
+ d.b = "UnknownDerived.b";
+ d.ud = "UnknownDerived.ud";
+ throw d;
+ }
+
+ public void
+ knownDerivedAsBase(Ice.Current current)
+ throws Base
+ {
+ KnownDerived d = new KnownDerived();
+ d.b = "KnownDerived.b";
+ d.kd = "KnownDerived.kd";
+ throw d;
+ }
+
+ public void
+ knownDerivedAsKnownDerived(Ice.Current current)
+ throws KnownDerived
+ {
+ KnownDerived d = new KnownDerived();
+ d.b = "KnownDerived.b";
+ d.kd = "KnownDerived.kd";
+ throw d;
+ }
+
+ public void
+ unknownIntermediateAsBase(Ice.Current current)
+ throws Base
+ {
+ UnknownIntermediate ui = new UnknownIntermediate();
+ ui.b = "UnknownIntermediate.b";
+ ui.ui = "UnknownIntermediate.ui";
+ throw ui;
+ }
+
+ public void
+ knownIntermediateAsBase(Ice.Current current)
+ throws Base
+ {
+ KnownIntermediate ki = new KnownIntermediate();
+ ki.b = "KnownIntermediate.b";
+ ki.ki = "KnownIntermediate.ki";
+ throw ki;
+ }
+
+ public void
+ knownMostDerivedAsBase(Ice.Current current)
+ throws Base
+ {
+ KnownMostDerived kmd = new KnownMostDerived();
+ kmd.b = "KnownMostDerived.b";
+ kmd.ki = "KnownMostDerived.ki";
+ kmd.kmd = "KnownMostDerived.kmd";
+ throw kmd;
+ }
+
+ public void
+ knownIntermediateAsknownIntermediate(Ice.Current current)
+ throws KnownIntermediate
+ {
+ KnownIntermediate ki = new KnownIntermediate();
+ ki.b = "KnownIntermediate.b";
+ ki.ki = "KnownIntermediate.ki";
+ throw ki;
+ }
+
+ public void
+ knownMostDerivedAsKnownIntermediate(Ice.Current current)
+ throws KnownIntermediate
+ {
+ KnownMostDerived kmd = new KnownMostDerived();
+ kmd.b = "KnownMostDerived.b";
+ kmd.ki = "KnownMostDerived.ki";
+ kmd.kmd = "KnownMostDerived.kmd";
+ throw kmd;
+ }
+
+ public void
+ knownMostDerivedAsKnownMostDerived(Ice.Current current)
+ throws KnownMostDerived
+ {
+ KnownMostDerived kmd = new KnownMostDerived();
+ kmd.b = "KnownMostDerived.b";
+ kmd.ki = "KnownMostDerived.ki";
+ kmd.kmd = "KnownMostDerived.kmd";
+ throw kmd;
+ }
+
+ public void
+ unknownMostDerived1AsBase(Ice.Current current)
+ throws Base
+ {
+ UnknownMostDerived1 umd1 = new UnknownMostDerived1();
+ umd1.b = "UnknownMostDerived1.b";
+ umd1.ki = "UnknownMostDerived1.ki";
+ umd1.umd1 = "UnknownMostDerived1.umd1";
+ throw umd1;
+ }
+
+ public void
+ unknownMostDerived1AsKnownIntermediate(Ice.Current current)
+ throws KnownIntermediate
+ {
+ UnknownMostDerived1 umd1 = new UnknownMostDerived1();
+ umd1.b = "UnknownMostDerived1.b";
+ umd1.ki = "UnknownMostDerived1.ki";
+ umd1.umd1 = "UnknownMostDerived1.umd1";
+ throw umd1;
+ }
+
+ public void
+ unknownMostDerived2AsBase(Ice.Current current)
+ throws Base
+ {
+ UnknownMostDerived2 umd2 = new UnknownMostDerived2();
+ umd2.b = "UnknownMostDerived2.b";
+ umd2.ui = "UnknownMostDerived2.ui";
+ umd2.umd2 = "UnknownMostDerived2.umd2";
+ throw umd2;
+ }
+ private Ice.ObjectAdapter _adapter;
+}