diff options
author | Manolo Carrasco <manolo@apache.org> | 2014-01-18 13:50:14 +0100 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2014-01-18 13:50:14 +0100 |
commit | 6f8ccb8062ca975d2d75104cc4b08088944bc974 (patch) | |
tree | ed50a204b65f551074817fed95e9f94a99fe5a3f | |
parent | 5a56b36ba5fa3d912375f85f2ac5ed66e2eef108 (diff) | |
download | gwtquery-6f8ccb8062ca975d2d75104cc4b08088944bc974.tar.gz gwtquery-6f8ccb8062ca975d2d75104cc4b08088944bc974.zip |
Add new methods to generator
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java | 9 | ||||
-rw-r--r-- | gwtquery-core/src/main/super/com/google/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 extends Binder> 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 extends Binder> 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(); |