• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AsyncProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.gwt.inject.client.AsyncProvider的典型用法代码示例。如果您正苦于以下问题:Java AsyncProvider类的具体用法?Java AsyncProvider怎么用?Java AsyncProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AsyncProvider类属于com.google.gwt.inject.client包,在下文中一共展示了AsyncProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testAsyncProviderWorksWithSingletons

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
public void testAsyncProviderWorksWithSingletons() {
  final AsyncProvider<Foo> fooAsyncProvider = injector.getFooAsyncProvider();
  // Foo is singleton
  assertNotNull(fooAsyncProvider);
  delayTestFinish(500);
  fooAsyncProvider.get(new AbstractAsyncCallback<Foo>() {

    public void onSuccess(final Foo foo1) {
      assertNotNull(foo1);
      delayTestFinish(500);
      fooAsyncProvider.get(new AbstractAsyncCallback<Foo>() {

        public void onSuccess(Foo foo2) {
          assertNotNull(foo2);
          assertSame(foo1, foo2);
          finishTest();
        }

      });
    }
  });
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:23,代码来源:AsyncProviderTest.java


示例2: testAsyncProviderCreatesNewInstances

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
public void testAsyncProviderCreatesNewInstances() {
  final AsyncProvider<FooAsync> fooAsyncAsyncProvider = injector.getFooAsyncAsyncProvider();
  // FooAsync is not a singleton, calling AsyncProvider<FooAsync>.get()
  // should create new instances
  assertNotNull(fooAsyncAsyncProvider);
  delayTestFinish(500);
  fooAsyncAsyncProvider.get(new AbstractAsyncCallback<FooAsync>() {
    
    public void onSuccess(final FooAsync fooAsync1) {
      assertNotNull(fooAsync1);
      delayTestFinish(500);
      fooAsyncAsyncProvider.get(new AbstractAsyncCallback<FooAsync>() {
        
        public void onSuccess(final FooAsync fooAsync2) {
          assertNotNull(fooAsync2);
          assertNotSame(fooAsync1, fooAsync2);
          finishTest();
        }
      });
    }
  });
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:23,代码来源:AsyncProviderTest.java


示例3: testAsyncProviderInGinjector

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
public void testAsyncProviderInGinjector() {
  AsyncProvider<Foo> fooAsyncProvider = injector.getFooAsyncProvider();
  assertNotNull(fooAsyncProvider);
  delayTestFinish(500);
  fooAsyncProvider.get(new AbstractAsyncCallback<Foo>() {

    public void onSuccess(Foo result) {
      assertNotNull(result);
      finishTest();
    }
    
  });
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:14,代码来源:AsyncProviderTest.java


示例4: testAsyncProviderInjection

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
public void testAsyncProviderInjection() {
  FooAsync fooAsync = injector.getFooAsync();
  AsyncProvider<Foo> fooAsyncProvider = fooAsync.getFooAsyncProvider();
  assertNotNull(fooAsyncProvider);
  delayTestFinish(500);
  fooAsyncProvider.get(new AbstractAsyncCallback<Foo>() {

    public void onSuccess(Foo result) {
      assertNotNull(result);
      finishTest();
    }
    
  });
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:15,代码来源:AsyncProviderTest.java


示例5: testAsyncProviderWithSupertype

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
public void testAsyncProviderWithSupertype() {
  AsyncProvider<Foo> fooAsyncProvider = injector.getFooAsyncProvider();
  assertNotNull(fooAsyncProvider);
  delayTestFinish(500);
  fooAsyncProvider.get(new AbstractAsyncCallback<Object>() {

    public void onSuccess(Object result) {
      assertNotNull(result);
      finishTest();
    }
    
  });
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:14,代码来源:AsyncProviderTest.java


示例6: ActivityAsyncProxy

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
@SuppressWarnings( "ConstantConditions" )
@Inject
public ActivityAsyncProxy( @Nonnull final AsyncProvider<T> provider )
{
  assert ( null != provider );
  _provider = provider;
}
 
开发者ID:realityforge,项目名称:gwt-presenter,代码行数:8,代码来源:ActivityAsyncProxy.java


示例7: isAsyncProviderKey

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
private boolean isAsyncProviderKey(Key<?> key) {
  Type keyType = key.getTypeLiteral().getType();
  return keyType instanceof ParameterizedType &&
  ((ParameterizedType) keyType).getRawType() == AsyncProvider.class;
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:6,代码来源:ImplicitBindingCreator.java


示例8: FooAsync

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
@Inject
public FooAsync(AsyncProvider<Foo> asyncProvider) {
  this.asyncProvider = asyncProvider;
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:5,代码来源:FooAsync.java


示例9: getFooAsyncProvider

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
AsyncProvider<Foo> getFooAsyncProvider() {
  return asyncProvider;
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:4,代码来源:FooAsync.java


示例10: asyncProviderFoo

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
public static Key<AsyncProvider<Foo>> asyncProviderFoo() {
  return new Key<AsyncProvider<Foo>>() {};
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:4,代码来源:TestUtils.java


示例11: PresenterWidgetFactory

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
@Inject
public PresenterWidgetFactory(AsyncProvider<T> provider) {
	this.provider = provider;
}
 
开发者ID:domax,项目名称:gwt-dynamic-plugins,代码行数:5,代码来源:PresenterWidgetFactory.java


示例12: getConfigPresenter

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
 * @return the ConfigPresenter configured for the module.
 */
AsyncProvider<ConfigPresenter> getConfigPresenter();
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:SwitchYardGinjector.java


示例13: getApplicationPresenter

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
 * @return the ApplicationPresenter configured for the module.
 */
AsyncProvider<ApplicationPresenter> getApplicationPresenter();
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:SwitchYardGinjector.java


示例14: getArtifactPresenter

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
 * @return the ArtifactPresenter configured for the module.
 */
AsyncProvider<ArtifactPresenter> getArtifactPresenter();
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:SwitchYardGinjector.java


示例15: getServicePresenter

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
 * @return the ServicePresenter configured for the module.
 */
AsyncProvider<ServicePresenter> getServicePresenter();
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:SwitchYardGinjector.java


示例16: getReferencePresenter

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
 * @return the ReferencePresenter configured for the module.
 */
AsyncProvider<ReferencePresenter> getReferencePresenter();
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:SwitchYardGinjector.java


示例17: getSwitchYardMetricsPresenter

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
 * @return the MetricsPresenter configured for the module.
 */
AsyncProvider<MetricsPresenter> getSwitchYardMetricsPresenter();
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:SwitchYardGinjector.java


示例18: getSwitchYardRuntimePresenter

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
 * @return the RuntimePresenter configured for the module.
 */
AsyncProvider<RuntimePresenter> getSwitchYardRuntimePresenter();
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:5,代码来源:SwitchYardGinjector.java


示例19: getFooAsyncProvider

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
AsyncProvider<Foo> getFooAsyncProvider(); 
开发者ID:google-code-export,项目名称:google-gin,代码行数:2,代码来源:AsyncProviderGinjector.java


示例20: getFooAsyncAsyncProvider

import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
AsyncProvider<FooAsync> getFooAsyncAsyncProvider(); 
开发者ID:google-code-export,项目名称:google-gin,代码行数:2,代码来源:AsyncProviderGinjector.java



注:本文中的com.google.gwt.inject.client.AsyncProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AclEntryScopeProto类代码示例发布时间:2022-05-22
下一篇:
Java TimelineDelegationTokenIdentifier类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap