@@ -0,0 +1,1459 @@
+package org.lucidfox.jpromises.gwt;%0A%0Aimport org.lucidfox.jpromises.annotation.GwtCompatible;%0Aimport org.lucidfox.jpromises.core.RejectCallback;%0Aimport org.lucidfox.jpromises.core.ResolveCallback;%0Aimport org.lucidfox.jpromises.core.Thenable;%0A%0Aimport com.google.gwt.core.client.JavaScriptObject;%0A%0A/**%0A * %3Cp%3E%0A * A wrapper for a native JavaScript thenable satisfying the Promises/A+ specification - for example, a%0A * JQuery %7B@code Deferred%7D object or a %7B@code Promise%7D as implemented natively by modern browsers.%0A * %3C/p%3E%0A * %3Cp%3E%0A * This class enables GWT code to mix Java promises with JavaScript thenables. To cast an arbitrary%0A * %7B@code JavaScriptObject%7D to a %7B@code JsThenable%7D, use the %7B@link JavaScriptObject#cast%7D method:%0A * %3C/p%3E%0A * %3Cpre%3E%0A * JsThenable&lt;ValueType&gt; thenable = javaScriptObject.cast();%0A * %3C/pre%3E%0A *%0A * @param %3CV%3E the value type%0A */%0A@GwtCompatible%0Apublic class JsThenable%3CV%3E extends JavaScriptObject implements Thenable%3CV%3E %7B%0A%09protected JsThenable() %7B %7D%0A%0A%09@Override%0A%09public native %3CR%3E JsThenable%3CR%3E then(final ResolveCallback%3C? super V, R%3E onResolve,%0A%09%09%09final RejectCallback%3CR%3E onReject) throws Exception /*-%7B%0A%09%09return this.then(onResolve == null ? null : function(value) %7B%0A%09%09%09onResolve.@org.lucidfox.jpromises.core.ResolveCallback::onResolve(Ljava/lang/Object;)(value);%0A%09%09%7D, onReject == null ? null : function(exception) %7B%0A%09%09%09onReject.@org.lucidfox.jpromises.core.RejectCallback::onReject(Ljava/lang/Throwable;)(exception);%0A%09%09%7D);%0A%09%7D-*/;%0A%7D%0A

Add JsThenable