1.1 --- a/json/src/main/java/org/apidesign/html/json/spi/Proto.java Sun Jan 05 23:14:06 2014 +0100
1.2 +++ b/json/src/main/java/org/apidesign/html/json/spi/Proto.java Sun Jan 05 23:20:14 2014 +0100
1.3 @@ -419,7 +419,15 @@
1.4 functions[index] = name;
1.5 }
1.6
1.7 - public Proto protoFor(Object obj, BrwsrCtx context) {
1.8 + /** Creates new proto-object for given {@link Model} class bound to
1.9 + * provided context.
1.10 + *
1.11 + * @param obj instance of appropriate {@link Model} class
1.12 + * @param context the browser context
1.13 + * @return new proto-object that the generated class can use for
1.14 + * communication with the infrastructure
1.15 + */
1.16 + public Proto createProto(Object obj, BrwsrCtx context) {
1.17 return new Proto(obj, this, context);
1.18 }
1.19
2.1 --- a/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java Sun Jan 05 23:14:06 2014 +0100
2.2 +++ b/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java Sun Jan 05 23:20:14 2014 +0100
2.3 @@ -219,7 +219,7 @@
2.4 w.append(body.toString());
2.5 w.append(" private static Class<" + inPckName(e) + "> modelFor() { return null; }\n");
2.6 w.append(" private ").append(className).append("(net.java.html.BrwsrCtx context) {\n");
2.7 - w.append(" this.proto = TYPE.protoFor(this, context);\n");
2.8 + w.append(" this.proto = TYPE.createProto(this, context);\n");
2.9 for (Prprt p : props) {
2.10 if (p.array()) {
2.11 final String tn = typeName(e, p);