本文整理汇总了Java中com.google.gwt.inject.client.GinModules类的典型用法代码示例。如果您正苦于以下问题:Java GinModules类的具体用法?Java GinModules怎么用?Java GinModules使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GinModules类属于com.google.gwt.inject.client包,在下文中一共展示了GinModules类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getClassesToImport
import com.google.gwt.inject.client.GinModules; //导入依赖的package包/类
String[] getClassesToImport() {
return new String[] { com.mvp4g.client.history.PlaceService.class.getName(),
GWT.class.getName(),
com.google.gwt.user.client.History.class.getName(),
ServiceDefTarget.class.getName(),
PresenterInterface.class.getName(),
EventBus.class.getName(),
Mvp4gException.class.getName(),
HistoryConverter.class.getName(),
Mvp4gEventPasser.class.getName(),
Mvp4gModule.class.getName(),
GinModules.class.getName(),
Ginjector.class.getName(),
BaseEventBus.class.getName(),
EventFilter.class.getName(),
EventHandlerInterface.class.getName(),
List.class.getName(),
NavigationEventCommand.class.getName(),
NavigationConfirmationInterface.class.getName(),
RunAsyncCallback.class.getName(),
Mvp4gRunAsync.class.getName(),
Command.class.getName(),
HistoryProxyProvider.class.getName(),
DefaultHistoryProxy.class.getName() };
}
示例2: getPropertyNamesFromInjectorInterface
import com.google.gwt.inject.client.GinModules; //导入依赖的package包/类
private void getPropertyNamesFromInjectorInterface(Class<?> ginjectorType, Set<String> propertyNames) {
GinModules ginModulesAnnotation = ginjectorType.getAnnotation(GinModules.class);
if (ginModulesAnnotation != null) {
propertyNames.addAll(Arrays.asList(ginModulesAnnotation.properties()));
}
for (Class<?> ancestor : ginjectorType.getInterfaces()) {
getPropertyNamesFromInjectorInterface(ancestor, propertyNames);
}
}
示例3: getModuleClassesFromInjectorInterface
import com.google.gwt.inject.client.GinModules; //导入依赖的package包/类
private void getModuleClassesFromInjectorInterface(Class<?> ginjectorType, Set<Class<? extends GinModule>> moduleClasses) {
GinModules ginModulesAnnotation = ginjectorType.getAnnotation(GinModules.class);
if (ginModulesAnnotation != null) {
moduleClasses.addAll(Arrays.asList(ginModulesAnnotation.value()));
}
for (Class<?> ancestor : ginjectorType.getInterfaces()) {
getModuleClassesFromInjectorInterface(ancestor, moduleClasses);
}
}
示例4: getPropertyNamesFromInjectorInterface
import com.google.gwt.inject.client.GinModules; //导入依赖的package包/类
private void getPropertyNamesFromInjectorInterface(Class<?> ginjectorType,
Set<String> propertyNames) {
GinModules ginModulesAnnotation = ginjectorType.getAnnotation(GinModules.class);
if (ginModulesAnnotation != null) {
propertyNames.addAll(Arrays.asList(ginModulesAnnotation.properties()));
}
for (Class<?> ancestor : ginjectorType.getInterfaces()) {
getPropertyNamesFromInjectorInterface(ancestor, propertyNames);
}
}
示例5: getModuleClassesFromInjectorInterface
import com.google.gwt.inject.client.GinModules; //导入依赖的package包/类
private void getModuleClassesFromInjectorInterface(Class<?> ginjectorType,
Set<Class<? extends GinModule>> moduleClasses) {
for (Class<?> ancestor : ginjectorType.getInterfaces()) {
getModuleClassesFromInjectorInterface(ancestor, moduleClasses);
}
GinModules ginModulesAnnotation = ginjectorType.getAnnotation(GinModules.class);
if (ginModulesAnnotation != null) {
moduleClasses.addAll(Arrays.asList(ginModulesAnnotation.value()));
}
}
示例6: createGinjector
import com.google.gwt.inject.client.GinModules; //导入依赖的package包/类
private String createGinjector(TreeLogger logger, GeneratorContext context, String packageName,
String requestedName, String newClassName, String moduleName) {
String ginjectorName = requestedName + "Ginjector";
ClassSourceFileComposerFactory ginjectorFactory =
new ClassSourceFileComposerFactory(packageName, ginjectorName);
ginjectorFactory.makeInterface();
ginjectorFactory.addImplementedInterface(Ginjector.class.getCanonicalName());
ginjectorFactory.addImport(GinModules.class.getCanonicalName());
ginjectorFactory.addAnnotationDeclaration("@GinModules(" + moduleName + ".class)");
SourceWriter ginjectorWriter = ginjectorFactory.createSourceWriter(context,
context.tryCreate(logger, packageName, ginjectorName));
ginjectorWriter.println("void injectMembers(" + newClassName + " obj);");
ginjectorWriter.commit(logger);
return ginjectorName;
}