本文整理汇总了Java中com.google.gwt.inject.client.AsyncProvider类的典型用法代码示例。如果您正苦于以下问题:Java AsyncProvider类的具体用法?Java AsyncProvider怎么用?Java AsyncProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AsyncProvider类属于com.google.gwt.inject.client包,在下文中一共展示了AsyncProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
});
}
});
}
示例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();
}
});
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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();
}
});
}
示例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;
}
示例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;
}
示例8: FooAsync
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
@Inject
public FooAsync(AsyncProvider<Foo> asyncProvider) {
this.asyncProvider = asyncProvider;
}
示例9: getFooAsyncProvider
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
AsyncProvider<Foo> getFooAsyncProvider() {
return asyncProvider;
}
示例10: asyncProviderFoo
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
public static Key<AsyncProvider<Foo>> asyncProviderFoo() {
return new Key<AsyncProvider<Foo>>() {};
}
示例11: PresenterWidgetFactory
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
@Inject
public PresenterWidgetFactory(AsyncProvider<T> provider) {
this.provider = provider;
}
示例12: getConfigPresenter
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
* @return the ConfigPresenter configured for the module.
*/
AsyncProvider<ConfigPresenter> getConfigPresenter();
示例13: getApplicationPresenter
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
* @return the ApplicationPresenter configured for the module.
*/
AsyncProvider<ApplicationPresenter> getApplicationPresenter();
示例14: getArtifactPresenter
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
* @return the ArtifactPresenter configured for the module.
*/
AsyncProvider<ArtifactPresenter> getArtifactPresenter();
示例15: getServicePresenter
import com.google.gwt.inject.client.AsyncProvider; //导入依赖的package包/类
/**
* @return the ServicePresenter configured for the module.
*/
AsyncProvider<ServicePresenter> getServicePresenter();