001 // Copyright 2007 Waterken Inc. under the terms of the MIT X license 002 // found at http://www.opensource.org/licenses/mit-license.html 003 package org.waterken.bounce; 004 005 import java.io.Serializable; 006 007 import org.joe_e.Struct; 008 import org.joe_e.array.BooleanArray; 009 import org.joe_e.array.ByteArray; 010 import org.joe_e.array.CharArray; 011 import org.joe_e.array.ConstArray; 012 import org.joe_e.array.DoubleArray; 013 import org.joe_e.array.FloatArray; 014 import org.joe_e.array.IntArray; 015 import org.joe_e.array.LongArray; 016 import org.joe_e.array.ShortArray; 017 import org.ref_send.Record; 018 import org.ref_send.deserializer; 019 import org.ref_send.name; 020 import org.ref_send.promise.Deferred; 021 import org.ref_send.promise.Promise; 022 import org.ref_send.promise.Receiver; 023 import org.ref_send.promise.Vat; 024 025 /** 026 * A record containing a field of each type. 027 */ 028 public final class 029 AllTypes extends Struct implements Record, Serializable { 030 static private final long serialVersionUID = 1L; 031 032 /** 033 * boolean 034 */ 035 public final BooleanArray b; 036 037 /** 038 * char 039 */ 040 public final CharArray c; 041 042 /** 043 * float 044 */ 045 public final FloatArray f; 046 047 /** 048 * double 049 */ 050 public final DoubleArray d; 051 052 /** 053 * byte 054 */ 055 public final ByteArray o; 056 057 /** 058 * short 059 */ 060 public final ShortArray s; 061 062 /** 063 * int 064 */ 065 public final IntArray i; 066 067 /** 068 * long 069 */ 070 public final LongArray l; 071 072 /** 073 * string 074 */ 075 public final String t; 076 077 /** 078 * pass-by-reference 079 */ 080 public final ConstArray<? extends Receiver<?>> r; 081 082 /** 083 * promise 084 */ 085 public final ConstArray<? extends Promise<?>> p; 086 087 /** 088 * known nested type 089 */ 090 public final ConstArray<Vat<Deferred<?>>> k; 091 092 /** 093 * unknown type 094 */ 095 public final Object a; 096 097 /** 098 * Constructs an instance. 099 * @param b {@link #b} 100 * @param c {@link #c} 101 * @param f {@link #f} 102 * @param d {@link #d} 103 * @param o {@link #o} 104 * @param s {@link #s} 105 * @param i {@link #i} 106 * @param l {@link #l} 107 * @param t {@link #t} 108 * @param r {@link #r} 109 * @param p {@link #p} 110 * @param k {@link #k} 111 * @param a {@link #a} 112 */ 113 public @deserializer 114 AllTypes(@name("b") final BooleanArray b, 115 @name("c") final CharArray c, 116 @name("f") final FloatArray f, 117 @name("d") final DoubleArray d, 118 @name("o") final ByteArray o, 119 @name("s") final ShortArray s, 120 @name("i") final IntArray i, 121 @name("l") final LongArray l, 122 @name("t") final String t, 123 @name("r") final ConstArray<? extends Receiver<?>> r, 124 @name("p") final ConstArray<? extends Promise<?>> p, 125 @name("k") final ConstArray<Vat<Deferred<?>>> k, 126 @name("a") final Object a) { 127 this.b = b; 128 this.c = c; 129 this.f = f; 130 this.d = d; 131 this.o = o; 132 this.s = s; 133 this.i = i; 134 this.l = l; 135 this.t = t; 136 this.r = r; 137 this.p = p; 138 this.k = k; 139 this.a = a; 140 } 141 }