1 package org.jacorb.test.orb.rmi; 2 3 import org.jacorb.test.orb.rmi.Boo; 4 import org.jacorb.test.orb.rmi.Foo; 5 6 25 26 public class RMITestUtil 27 { 28 public final static String STRING = 29 "the quick brown fox jumps over the lazy dog"; 30 31 public static String primitiveTypesToString(boolean flag, char c, byte b, 32 short s, int i, long l, 33 float f, double d) 34 { 35 String str = "flag:\t" + flag + "\n" 36 + "c:\t" + c + "\n" 37 + "b:\t" + b + "\n" 38 + "s:\t" + s + "\n" 39 + "i:\t" + i + "\n" 40 + "l:\t" + l + "\n" 41 + "f:\t" + f + "\n" 42 + "d:\t" + d + "\n"; 43 return str; 44 } 45 46 public static String echo(String s) 47 { 48 return s + " (echoed back)"; 49 } 50 51 public static Foo echoFoo(Foo f) 52 { 53 Foo newFoo = new Foo(f.i, f.s); 54 newFoo.i++; 55 newFoo.s += " <"; 56 return newFoo; 57 } 58 59 public static Boo echoBoo(Boo f) 60 { 61 Boo newBoo = new Boo(f.id, f.name); 62 newBoo.id += "+"; 63 newBoo.name += " <"; 64 return newBoo; 65 } 66 67 } 68 | Popular Tags |