google / j2cl

Java to Closure JavaScript transpiler
Apache License 2.0
1.23k stars 144 forks source link

What is the replacement for com.google.gwt.core.client.GWT #135

Closed neuronsupport closed 3 years ago

neuronsupport commented 3 years ago

What is the replacement for com.google.gwt.core.client.GWT to instantiate a class?

gkdn commented 3 years ago

GWT.create is a mechanism to use something called "deferred-binding" in GWT. It is used in conjunction with code generators and gwt.xml type binding.
Deferred doesn't exist in J2CL; you can instantiate all classes with regular constructor calls.. GWT code generators are replaced with standard Java APT code generators and gwt.xml binding is not supported.