blob: 18957e87825dc7588880b23bbe3671dd48611c21 [file] [log] [blame]
Stuart McCullochbb014372012-06-07 21:57:32 +00001package aQute.lib.json;
2
3import java.io.*;
4import java.lang.reflect.*;
5import java.util.*;
6
7abstract class Handler {
8 abstract void encode(Encoder app, Object object, Map<Object, Type> visited)
9 throws IOException, Exception;
10
11 Object decodeObject(Decoder isr) throws Exception {
12 throw new UnsupportedOperationException("Cannot be mapped to object " + this);
13 }
14
15 Object decodeArray(Decoder isr) throws Exception {
16 throw new UnsupportedOperationException("Cannot be mapped to array " + this);
17 }
18
19 Object decode(String s) throws Exception {
20 throw new UnsupportedOperationException("Cannot be mapped to string " + this);
21 }
22
23 Object decode(Number s) throws Exception {
24 throw new UnsupportedOperationException("Cannot be mapped to number " + this);
25 }
26
27 Object decode(boolean s) {
28 throw new UnsupportedOperationException("Cannot be mapped to boolean " + this);
29 }
30
31 Object decode() {
32 return null;
33 }
34
35}