本文整理汇总了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;未经允许,请勿转载。 |
请发表评论