@@ -43,6 +43,9 @@ public JsonReaderI(JsonReader base) {
4343 * called when json-smart parser meet an object key
4444 *
4545 * @param key key name
46+ * @return a JsonReaderI to handle the object parsing
47+ * @throws ParseException if parsing fails
48+ * @throws IOException if I/O error occurs
4649 */
4750 public JsonReaderI <?> startObject (String key ) throws ParseException , IOException {
4851 throw new RuntimeException (
@@ -53,41 +56,78 @@ public JsonReaderI<?> startObject(String key) throws ParseException, IOException
5356 * called when json-smart parser start an array.
5457 *
5558 * @param key the destination key name, or null.
59+ * @return a JsonReaderI to handle the array parsing
60+ * @throws ParseException if parsing fails
61+ * @throws IOException if I/O error occurs
5662 */
5763 public JsonReaderI <?> startArray (String key ) throws ParseException , IOException {
5864 throw new RuntimeException (ERR_MSG + " startArray in " + this .getClass () + " key=" + key );
5965 }
6066
61- /** called when json-smart done parsing a value */
67+ /**
68+ * called when json-smart done parsing a value
69+ *
70+ * @param current the current object being built
71+ * @param key the key for the value
72+ * @param value the parsed value
73+ * @throws ParseException if parsing fails
74+ * @throws IOException if I/O error occurs
75+ */
6276 public void setValue (Object current , String key , Object value )
6377 throws ParseException , IOException {
6478 throw new RuntimeException (ERR_MSG + " setValue in " + this .getClass () + " key=" + key );
6579 }
6680
67- /** ------------- */
81+ /**
82+ * Gets a value from the current object
83+ *
84+ * @param current the current object
85+ * @param key the key to get the value for
86+ * @return the value associated with the key
87+ */
6888 public Object getValue (Object current , String key ) {
6989 throw new RuntimeException (
7090 ERR_MSG + " getValue(Object current, String key) in " + this .getClass () + " key=" + key );
7191 }
7292
73- // Object current,
93+ /**
94+ * Gets the type for the specified key
95+ *
96+ * @param key the key to get the type for
97+ * @return the Type associated with the key
98+ */
7499 public Type getType (String key ) {
75100 throw new RuntimeException (
76101 ERR_MSG + " getType(String key) in " + this .getClass () + " key=" + key );
77102 }
78103
79- /** add a value in an array json object. */
104+ /**
105+ * add a value in an array json object.
106+ *
107+ * @param current the current array object
108+ * @param value the value to add
109+ * @throws ParseException if parsing fails
110+ * @throws IOException if I/O error occurs
111+ */
80112 public void addValue (Object current , Object value ) throws ParseException , IOException {
81113 throw new RuntimeException (
82114 ERR_MSG + " addValue(Object current, Object value) in " + this .getClass ());
83115 }
84116
85- /** use to instantiate a new object that will be used as an object */
117+ /**
118+ * use to instantiate a new object that will be used as an object
119+ *
120+ * @return a new object instance
121+ */
86122 public Object createObject () {
87123 throw new RuntimeException (ERR_MSG + " createObject() in " + this .getClass ());
88124 }
89125
90- /** use to instantiate a new object that will be used as an array */
126+ /**
127+ * use to instantiate a new object that will be used as an array
128+ *
129+ * @return a new array instance
130+ */
91131 public Object createArray () {
92132 throw new RuntimeException (ERR_MSG + " createArray() in " + this .getClass ());
93133 }
@@ -96,6 +136,9 @@ public Object createArray() {
96136 * Allow a mapper to convert a temporary structure to the final data format.
97137 *
98138 * <p>example: convert an List<Integer> to an int[]
139+ *
140+ * @param current the current object to convert
141+ * @return the converted object
99142 */
100143 @ SuppressWarnings ("unchecked" )
101144 public T convert (Object current ) {
0 commit comments