From 6f8ccb8062ca975d2d75104cc4b08088944bc974 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Sat, 18 Jan 2014 13:50:14 +0100 Subject: [PATCH] Add new methods to generator --- .../google/gwt/query/rebind/JsonBuilderGenerator.java | 9 +++++++-- .../gwt/query/super/com/google/gwt/query/client/GQ.java | 8 ++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java index 5de9dc31..3fc7868c 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java @@ -322,9 +322,14 @@ public class JsonBuilderGenerator extends Generator { sw.println("return null;"); sw.outdent(); sw.println("}"); - sw.println("public T create(String s) {"); + sw.println("public Binder create(String s) {"); sw.indent(); - sw.println("return (T)" + Properties.class.getName() + ".create(s);"); + sw.println("return " + Properties.class.getName() + ".create(s);"); + sw.outdent(); + sw.println("}"); + sw.println("public Binder create() {"); + sw.indent(); + sw.println("return " + Properties.class.getName() + ".create();"); sw.outdent(); sw.println("}"); } diff --git a/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java b/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java index a351fbbe..732d2902 100644 --- a/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java +++ b/gwtquery-core/src/main/super/com/google/gwt/query/super/com/google/gwt/query/client/GQ.java @@ -40,10 +40,14 @@ public class GQ { return ret; } - public static T create(String s) { + public static Binder create(String s) { return getFactory().create(s); } - + + public static Binder create() { + return getFactory().create(); + } + public static AjaxTransport getAjaxTransport() { if (ajaxTransport == null) { ajaxTransport = new AjaxTransportJs(); -- 2.39.5