| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
package net.wotonomy.foundation; |
| 23 |
|
|
| 24 |
|
import java.math.BigInteger; |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
public interface NSCoding { |
| 38 |
|
|
| 39 |
|
|
| 40 |
|
public static class _BigDecimalSupport extends _BigIntegerSupport { |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 44 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
|
| 48 |
|
public Object decodeObject(NSCoder nscoder) { |
| 49 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
|
| 53 |
0 |
public _BigDecimalSupport() { |
| 54 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
|
| 59 |
|
public static class _BigIntegerSupport extends Support { |
| 60 |
|
|
| 61 |
|
|
| 62 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 63 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 64 |
|
} |
| 65 |
|
|
| 66 |
|
|
| 67 |
|
public Object decodeObject(NSCoder nscoder) { |
| 68 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
|
| 72 |
|
protected static void _encodeBigInteger( |
| 73 |
|
NSCoder nscoder, |
| 74 |
|
BigInteger biginteger) { |
| 75 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
|
| 79 |
|
protected static BigInteger _decodeBigInteger(NSCoder nscoder, int i) { |
| 80 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
|
| 84 |
0 |
public _BigIntegerSupport() { |
| 85 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 86 |
|
} |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
|
| 90 |
|
public static class _DoubleSupport extends _NumberSupport { |
| 91 |
|
|
| 92 |
|
|
| 93 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 94 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
|
| 98 |
0 |
public _DoubleSupport() { |
| 99 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 100 |
|
} |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
|
| 104 |
|
public static class _FloatSupport extends _NumberSupport { |
| 105 |
|
|
| 106 |
|
|
| 107 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 108 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
|
| 112 |
0 |
public _FloatSupport() { |
| 113 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
|
| 118 |
|
public static class _LongSupport extends _NumberSupport { |
| 119 |
|
|
| 120 |
|
|
| 121 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 122 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
|
| 126 |
0 |
public _LongSupport() { |
| 127 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
|
| 132 |
|
public static class _IntegerSupport extends _NumberSupport { |
| 133 |
|
|
| 134 |
|
|
| 135 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 136 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
|
| 140 |
0 |
public _IntegerSupport() { |
| 141 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 142 |
|
} |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
|
| 146 |
|
public static class _ShortSupport extends _NumberSupport { |
| 147 |
|
|
| 148 |
|
|
| 149 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 150 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
|
| 154 |
0 |
public _ShortSupport() { |
| 155 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 156 |
|
} |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
|
| 160 |
|
public static class _ByteSupport extends _NumberSupport { |
| 161 |
|
|
| 162 |
|
|
| 163 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 164 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
|
| 168 |
0 |
public _ByteSupport() { |
| 169 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 170 |
|
} |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
|
| 174 |
|
public static class _NumberSupport extends Support { |
| 175 |
|
|
| 176 |
|
|
| 177 |
|
public Class classForCoder(Object obj) { |
| 178 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
|
| 182 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 183 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
|
| 187 |
|
public Object decodeObject(NSCoder nscoder) { |
| 188 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
|
| 192 |
0 |
public _NumberSupport() { |
| 193 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 194 |
|
} |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
|
| 198 |
|
public static class _CharacterSupport extends Support { |
| 199 |
|
|
| 200 |
|
|
| 201 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 202 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 203 |
|
} |
| 204 |
|
|
| 205 |
|
|
| 206 |
|
public Object decodeObject(NSCoder nscoder) { |
| 207 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 208 |
|
} |
| 209 |
|
|
| 210 |
|
|
| 211 |
0 |
public _CharacterSupport() { |
| 212 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 213 |
|
} |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
|
| 217 |
|
public static class _DateSupport extends Support { |
| 218 |
|
|
| 219 |
|
|
| 220 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 221 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 222 |
|
} |
| 223 |
|
|
| 224 |
|
|
| 225 |
|
public Object decodeObject(NSCoder nscoder) { |
| 226 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 227 |
|
} |
| 228 |
|
|
| 229 |
|
|
| 230 |
0 |
public _DateSupport() { |
| 231 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 232 |
|
} |
| 233 |
|
} |
| 234 |
|
|
| 235 |
|
|
| 236 |
|
public static class _StringSupport extends Support { |
| 237 |
|
|
| 238 |
|
|
| 239 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 240 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
|
| 244 |
|
public Object decodeObject(NSCoder nscoder) { |
| 245 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
|
| 249 |
0 |
public _StringSupport() { |
| 250 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 251 |
|
} |
| 252 |
|
} |
| 253 |
|
|
| 254 |
|
|
| 255 |
|
public static class _BooleanSupport extends Support { |
| 256 |
|
|
| 257 |
|
|
| 258 |
|
public void encodeWithCoder(Object obj, NSCoder nscoder) { |
| 259 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 260 |
|
} |
| 261 |
|
|
| 262 |
|
|
| 263 |
|
public Object decodeObject(NSCoder nscoder) { |
| 264 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
|
| 268 |
0 |
public _BooleanSupport() { |
| 269 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 270 |
|
} |
| 271 |
|
} |
| 272 |
|
|
| 273 |
|
|
| 274 |
0 |
public static abstract class Support { |
| 275 |
|
|
| 276 |
0 |
private static NSMutableDictionary classSupportMap = |
| 277 |
0 |
new NSMutableDictionary(16); |
| 278 |
|
|
| 279 |
|
public static Support supportForClass(Class aClass) { |
| 280 |
0 |
Support support = null; |
| 281 |
0 |
Class realClass = aClass; |
| 282 |
0 |
while (support == null && realClass != null) { |
| 283 |
0 |
support = (Support) classSupportMap.objectForKey(realClass); |
| 284 |
0 |
if (support == null) |
| 285 |
0 |
realClass.getSuperclass(); |
| 286 |
|
|
| 287 |
0 |
else if (aClass != realClass) |
| 288 |
0 |
classSupportMap.setObjectForKey(support, aClass); |
| 289 |
|
} |
| 290 |
0 |
return support; |
| 291 |
|
} |
| 292 |
|
|
| 293 |
|
public static void setSupportForClass(Support support, Class class1) { |
| 294 |
0 |
classSupportMap.setObjectForKey(support, class1); |
| 295 |
0 |
} |
| 296 |
|
|
| 297 |
|
|
| 298 |
|
|
| 299 |
|
|
| 300 |
|
|
| 301 |
|
public Class classForCoder(Object obj) { |
| 302 |
0 |
return obj.getClass(); |
| 303 |
|
} |
| 304 |
|
|
| 305 |
|
public abstract void encodeWithCoder(Object obj, NSCoder nscoder); |
| 306 |
|
|
| 307 |
|
public abstract Object decodeObject(NSCoder nscoder); |
| 308 |
|
|
| 309 |
|
protected static void _encodeUTF8(String s, NSCoder nscoder) { |
| 310 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 311 |
|
} |
| 312 |
|
|
| 313 |
|
protected static String _decodeUTF8(NSCoder nscoder) { |
| 314 |
0 |
throw new UnsupportedOperationException("Not Yet Implemented"); |
| 315 |
|
} |
| 316 |
|
|
| 317 |
|
static { |
| 318 |
0 |
setSupportForClass(new _StringSupport(), java.lang.String.class); |
| 319 |
0 |
setSupportForClass(new _BooleanSupport(), java.lang.Boolean.class); |
| 320 |
0 |
setSupportForClass(new _NumberSupport(), null); |
| 321 |
0 |
setSupportForClass(new _ByteSupport(), java.lang.Byte.class); |
| 322 |
0 |
setSupportForClass(new _ShortSupport(), java.lang.Short.class); |
| 323 |
0 |
setSupportForClass(new _IntegerSupport(), java.lang.Integer.class); |
| 324 |
0 |
setSupportForClass(new _LongSupport(), java.lang.Long.class); |
| 325 |
0 |
setSupportForClass(new _FloatSupport(), java.lang.Float.class); |
| 326 |
0 |
setSupportForClass(new _DoubleSupport(), java.lang.Double.class); |
| 327 |
0 |
setSupportForClass( |
| 328 |
0 |
new _BigIntegerSupport(), |
| 329 |
0 |
java.math.BigInteger.class); |
| 330 |
0 |
setSupportForClass( |
| 331 |
0 |
new _BigDecimalSupport(), |
| 332 |
0 |
java.math.BigDecimal.class); |
| 333 |
0 |
setSupportForClass(new _DateSupport(), java.util.Date.class); |
| 334 |
0 |
setSupportForClass( |
| 335 |
0 |
new _CharacterSupport(), |
| 336 |
0 |
java.lang.Character.class); |
| 337 |
0 |
} |
| 338 |
|
|
| 339 |
0 |
public Support() { |
| 340 |
0 |
} |
| 341 |
|
} |
| 342 |
|
|
| 343 |
|
|
| 344 |
|
|
| 345 |
|
|
| 346 |
|
|
| 347 |
|
|
| 348 |
|
|
| 349 |
|
|
| 350 |
|
|
| 351 |
|
|
| 352 |
|
|
| 353 |
|
} |
| 354 |
|
|
| 355 |
|
|
| 356 |
|
|
| 357 |
|
|
| 358 |
|
|
| 359 |
|
|
| 360 |
|
|
| 361 |
|
|
| 362 |
|
|
| 363 |
|
|
| 364 |
|
|
| 365 |
|
|
| 366 |
|
|
| 367 |
|
|
| 368 |
|
|
| 369 |
|
|
| 370 |
|
|
| 371 |
|
|