1.1 --- a/json/src/main/java/org/apidesign/html/json/spi/Proto.java Sun Jan 05 23:20:14 2014 +0100
1.2 +++ b/json/src/main/java/org/apidesign/html/json/spi/Proto.java Sun Jan 05 23:24:07 2014 +0100
1.3 @@ -449,16 +449,25 @@
1.4 */
1.5 public abstract void onMessage(Model model, int index, int type, Object data);
1.6
1.7 + //
1.8 + // Various support methods the generated classes use
1.9 + //
1.10 +
1.11 + /** Converts and array of raw JSON objects into an array of typed
1.12 + * Java {@lin Model} classes.
1.13 + *
1.14 + * @param <T> the type of the destination array
1.15 + * @param context browser context to use
1.16 + * @param src array of raw JSON objects
1.17 + * @param destType type of the individual array elements
1.18 + * @param dest array to be filled with read type instances
1.19 + */
1.20 public <T> void copyJSON(BrwsrCtx context, Object[] src, Class<T> destType, T[] dest) {
1.21 for (int i = 0; i < src.length && i < dest.length; i++) {
1.22 dest[i] = org.netbeans.html.json.impl.JSON.read(context, destType, src[i]);
1.23 }
1.24 }
1.25
1.26 - //
1.27 - // Various support methods the generated classes use
1.28 - //
1.29 -
1.30 /** Compares two objects that can be converted to integers.
1.31 * @return true if they are the same
1.32 */