1 package org.jacorb.test.bugs.bug401; 2 3 import org.omg.CORBA.*; 4 5 public class AnyServant extends AnyServerPOA 6 { 7 public A getA() 8 { 9 A a = new A(){}; 10 a.aa = 0xAA; 11 return a; 12 } 13 14 public B getB() 15 { 16 B b = new B(){}; 17 b.aa = 0xAA; 18 b.bb = 0xBB; 19 return b; 20 } 21 22 public Any getAnyA() 23 { 24 A a = getA(); 25 Any aa = _orb().create_any(); 26 AHelper.insert(aa, a); 27 return aa; 28 } 29 30 public Any getAnyB() 31 { 32 B b = getB(); 33 Any bb = _orb().create_any(); 34 BHelper.insert(bb, b); 35 return bb; 36 } 37 38 public Any[] getAnyAB() 39 { 40 Any[] any = new Any[2]; 41 42 any[0] = _orb().create_any(); 43 AHelper.insert(any[0], getA()); 44 45 any[1] = _orb().create_any(); 46 BHelper.insert(any[1], getB()); 47 48 return any; 49 } 50 51 } | Popular Tags |