本文整理汇总了Java中jsinterop.base.Js.cast方法的典型用法代码示例。如果您正苦于以下问题:Java Js.cast方法的具体用法?Java Js.cast怎么用?Java Js.cast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jsinterop.base.Js
的用法示例。
在下文中一共展示了Js.cast方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: outputStatus
import jsinterop.base.Js; //导入方法依赖的package包/类
private void outputStatus( @Nonnull final ObservablePromise<Response, Object> observablePromise )
{
final ObservablePromise.State state = observablePromise.getState();
final Response response = ObservablePromise.State.FULFILLED == state ? observablePromise.getValue() : null;
final elemental2.core.JsError error =
ObservablePromise.State.REJECTED == state ? Js.cast( observablePromise.getError() ) : null;
final String message =
"Promise State: " + state +
( null != response ? " - Response: " + response.status + ": " + response.statusText : "" ) +
( null != error ? " - Error: " + error.message : "" );
DomGlobal.console.log( message );
DomGlobal.document.querySelector( "#app" ).textContent = message;
}
示例2: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
static SimpleClass.ConsumeAliasedTypeNumberUnionType of(Object o) {
return Js.cast(o);
}
示例3: asV
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
default V asV() {
return Js.cast(this);
}
示例4: scheduleArezKeyUpdate
import jsinterop.base.Js; //导入方法依赖的package包/类
/**
* Schedule state update the updates arez state.
* Makes sure the super class is invoked so reportStateChanged() is not invoked on State observable.
*/
private void scheduleArezKeyUpdate( @Nonnull final JsPropertyMap<Object> data )
{
super.scheduleStateUpdate( ( p, s ) -> Js.cast( JsPropertyMap.of( AREZ_STATE_KEY, JsObject.freeze( data ) ) ),
null );
}
示例5: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
static SimpleInterface.WithUnionTypeFooCallbackFn.P0UnionType of(Object o) {
return Js.cast(o);
}
示例6: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
static Child.MethodUnionType of(Object o) {
return Js.cast(o);
}
示例7: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
static ReactNode of( final JsArray<ReactNode> elements )
{
return Js.cast( elements );
}
示例8: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
static Global.FooFooUnionType of(Object o) {
return Js.cast(o);
}
示例9: asString
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
default String asString()
{
return Js.cast( this );
}
示例10: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
public static MyLibThirdPartyClass of(ThirdPartyClass o) {
return Js.cast(o);
}
示例11: windowToken
import jsinterop.base.Js; //导入方法依赖的package包/类
private String windowToken() {
Location location= Js.cast(DomGlobal.location);
return location.getPathname().substring(1) + location.getSearch();
}
示例12: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
static Foo.GetFooParentInterfaceTypeParameterUnionType of(Object o) {
return Js.cast(o);
}
示例13: asExtraMethodBarType
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
default MyLibThirdPartyClass.ExtraMethodBarType<T> asExtraMethodBarType() {
return Js.cast(this);
}
示例14: asChild
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
default Child asChild() {
return Js.cast(this);
}
示例15: of
import jsinterop.base.Js; //导入方法依赖的package包/类
@JsOverlay
static InterfaceWithStructuralTypeImpl.Bar4Param1UnionType of(Object o) {
return Js.cast(o);
}