本文整理汇总了Java中com.google.gwt.inject.rebind.ErrorManager类的典型用法代码示例。如果您正苦于以下问题:Java ErrorManager类的具体用法?Java ErrorManager怎么用?Java ErrorManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ErrorManager类属于com.google.gwt.inject.rebind包,在下文中一共展示了ErrorManager类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ProviderMethodBinding
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
ProviderMethodBinding(ErrorManager errorManager, GuiceUtil guiceUtil,
MethodCallUtil methodCallUtil, ProviderMethod<?> providerMethod, Context context) {
super(context, TypeLiteral.get(providerMethod.getMethod().getDeclaringClass()));
this.guiceUtil = guiceUtil;
this.methodCallUtil = methodCallUtil;
this.moduleType = providerMethod.getInstance().getClass();
Method method = providerMethod.getMethod();
this.providerMethod = MethodLiteral.get(method, TypeLiteral.get(method.getDeclaringClass()));
this.targetKey = providerMethod.getKey();
if (!ReflectUtil.hasAccessibleDefaultConstructor(method.getDeclaringClass())) {
errorManager.logError(
"Cannot invoke a @Provides method on a module without a default constructor. "
+ "Gin must be able to create the module at runtime in order to invoke an instance "
+ "method. Method name: %s",
method);
}
}
示例2: GinjectorFragmentContext
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Inject
public GinjectorFragmentContext(
ErrorManager errorManager,
FragmentPackageName.Factory fragmentPackageNameFactory,
GinjectorNameGenerator ginjectorNameGenerator,
SourceWriteUtil.Factory sourceWriteUtilFactory,
@Assisted GinjectorBindings bindings,
@Assisted FragmentPackageName fragmentPackageName,
@Assisted SourceWriter sourceWriter) {
this.bindings = bindings;
this.errorManager = errorManager;
this.fragmentPackageName = fragmentPackageName;
this.fragmentPackageNameFactory = fragmentPackageNameFactory;
this.ginjectorNameGenerator = ginjectorNameGenerator;
this.sourceWriteUtil = sourceWriteUtilFactory.create(bindings);
this.sourceWriter = sourceWriter;
}
示例3: GinjectorBindingsOutputter
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Inject
GinjectorBindingsOutputter(GeneratorContext ctx,
ErrorManager errorManager,
GinjectorFragmentOutputter.Factory fragmentOutputterFactory,
FragmentPackageName.Factory fragmentPackageNameFactory,
GinjectorNameGenerator ginjectorNameGenerator,
TreeLogger logger,
MethodCallUtil methodCallUtil,
ReachabilityAnalyzer reachabilityAnalyzer,
SourceWriteUtil.Factory sourceWriteUtilFactory) {
this.ctx = ctx;
this.errorManager = errorManager;
this.fragmentOutputterFactory = fragmentOutputterFactory;
this.fragmentPackageNameFactory = fragmentPackageNameFactory;
this.ginjectorNameGenerator = ginjectorNameGenerator;
this.logger = logger;
this.methodCallUtil = methodCallUtil;
this.reachabilityAnalyzer = reachabilityAnalyzer;
this.sourceWriteUtilFactory = sourceWriteUtilFactory;
}
示例4: setUp
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
control = EasyMock.createControl();
errorManager = control.createMock("errorManager", ErrorManager.class);
root = control.createMock("root", GinjectorBindings.class);
child = control.createMock("child", GinjectorBindings.class);
grandchild = control.createMock("grandchild", GinjectorBindings.class);
othergrandchild = control.createMock("other", GinjectorBindings.class);
expect(grandchild.getParent()).andStubReturn(child);
expect(child.getParent()).andStubReturn(root);
expect(root.getParent()).andStubReturn(null);
expect(root.isBoundLocallyInChild(isA(Key.class))).andStubReturn(false);
expect(child.isBoundLocallyInChild(isA(Key.class))).andStubReturn(false);
expect(grandchild.isBoundLocallyInChild(isA(Key.class))).andStubReturn(false);
expect(root.getBinding(isA(Key.class))).andStubReturn(null);
expect(child.getBinding(isA(Key.class))).andStubReturn(null);
expect(grandchild.getBinding(isA(Key.class))).andStubReturn(null);
expect(root.isPinned(isA(Key.class))).andStubReturn(false);
expect(child.isPinned(isA(Key.class))).andStubReturn(false);
expect(grandchild.isPinned(isA(Key.class))).andStubReturn(false);
}
示例5: GinjectorFragmentOutputter
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Inject
GinjectorFragmentOutputter(GeneratorContext ctx, GinjectorFragmentContext.Factory ginjectorFragmentContextFactory, ErrorManager errorManager,
TreeLogger logger, SourceWriteUtil.Factory sourceWriteUtilFactory, @Assisted GinjectorBindings bindings,
@Assisted FragmentPackageName fragmentPackageName, @Assisted("ginjectorPackageName") String ginjectorPackageName,
@Assisted("ginjectorClassName") String ginjectorClassName) {
this.ctx = ctx;
this.errorManager = errorManager;
this.logger = logger;
this.sourceWriteUtil = sourceWriteUtilFactory.create(bindings);
this.fragmentPackageName = fragmentPackageName;
this.ginjectorClassName = ginjectorClassName;
this.nameGenerator = bindings.getNameGenerator();
fragmentClassName = nameGenerator.getFragmentClassName(ginjectorClassName, fragmentPackageName);
if (fragmentClassName.contains(".")) {
errorManager.logError("Internal error: the fragment class name \"%s\" contains a full stop.", fragmentClassName);
}
PrintWriter printWriter = ctx.tryCreate(logger, fragmentPackageName.toString(), fragmentClassName);
if (printWriter == null) {
// Something is very wrong! We already created this fragment, but the
// GinjectorBindingsOutputter should only create each fragment once.
// Something bad will probably happen later on if we continue, so just
// abort.
logger.log(TreeLogger.Type.ERROR, "The fragment " + fragmentPackageName + "." + fragmentClassName + " already exists.");
throw new IllegalStateException("The fragment " + fragmentClassName + " already exists.");
}
ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(fragmentPackageName.toString(), fragmentClassName);
composerFactory.addImport(GWT.class.getCanonicalName());
composerFactory.addImport(ginjectorPackageName + "." + ginjectorClassName);
writer = composerFactory.createSourceWriter(ctx, printWriter);
injectorWriteContext = ginjectorFragmentContextFactory.create(bindings, fragmentPackageName, writer);
}
示例6: UnresolvedBindingValidator
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Inject
public UnresolvedBindingValidator(EagerCycleFinder cycleFinder, ErrorManager errorManager,
@Assisted TreeLogger logger) {
this.cycleFinder = cycleFinder;
this.errorManager = errorManager;
this.logger = logger;
}
示例7: ExposedChildBinding
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
public ExposedChildBinding(ErrorManager errorManager, Key<?> key, GinjectorBindings childBindings,
Context context) {
super(context, key);
this.errorManager = Preconditions.checkNotNull(errorManager);
this.key = Preconditions.checkNotNull(key);
this.childBindings = Preconditions.checkNotNull(childBindings);
}
示例8: BindingFactoryImpl
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Inject
public BindingFactoryImpl(
ErrorManager errorManager,
GuiceUtil guiceUtil,
@GinjectorInterfaceType Class<? extends Ginjector> ginjectorInterface,
MethodCallUtil methodCallUtil) {
this.errorManager = errorManager;
this.guiceUtil = guiceUtil;
this.ginjectorInterface = ginjectorInterface;
this.methodCallUtil = methodCallUtil;
}
示例9: ParentBinding
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
ParentBinding(ErrorManager errorManager, Key<?> key, GinjectorBindings parentBindings,
Context context) {
super(context);
this.errorManager = Preconditions.checkNotNull(errorManager);
this.key = Preconditions.checkNotNull(key);
this.parentBindings = Preconditions.checkNotNull(parentBindings);
}
示例10: setUp
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
super.setUp();
control = EasyMock.createControl();
origin = control.createMock(GinjectorBindings.class);
errorManager = control.createMock(ErrorManager.class);
eagerCycleFinder = new EagerCycleFinder(errorManager);
}
示例11: EagerCycleFinder
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Inject
public EagerCycleFinder(ErrorManager errorManager) {
this.errorManager = errorManager;
}
示例12: GinjectorFragmentOutputter
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Inject
GinjectorFragmentOutputter(
GeneratorContext ctx,
GinjectorFragmentContext.Factory ginjectorFragmentContextFactory,
ErrorManager errorManager,
TreeLogger logger,
SourceWriteUtil.Factory sourceWriteUtilFactory,
@Assisted GinjectorBindings bindings,
@Assisted FragmentPackageName fragmentPackageName,
@Assisted("ginjectorPackageName") String ginjectorPackageName,
@Assisted("ginjectorClassName") String ginjectorClassName) {
this.ctx = ctx;
this.errorManager = errorManager;
this.logger = logger;
this.sourceWriteUtil = sourceWriteUtilFactory.create(bindings);
this.fragmentPackageName = fragmentPackageName;
this.ginjectorClassName = ginjectorClassName;
this.nameGenerator = bindings.getNameGenerator();
fragmentClassName = nameGenerator.getFragmentClassName(ginjectorClassName, fragmentPackageName);
if (fragmentClassName.contains(".")) {
errorManager.logError("Internal error: the fragment class name \"%s\" contains a full stop.",
fragmentClassName);
}
PrintWriter printWriter =
ctx.tryCreate(logger, fragmentPackageName.toString(), fragmentClassName);
if (printWriter == null) {
// Something is very wrong! We already created this fragment, but the
// GinjectorBindingsOutputter should only create each fragment once.
// Something bad will probably happen later on if we continue, so just
// abort.
logger.log(TreeLogger.Type.ERROR, "The fragment " + fragmentPackageName + "." +
fragmentClassName + " already exists.");
throw new IllegalStateException("The fragment " + fragmentClassName + " already exists.");
}
ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(
fragmentPackageName.toString(), fragmentClassName);
composerFactory.addImport(GWT.class.getCanonicalName());
composerFactory.addImport(ginjectorPackageName + "." + ginjectorClassName);
writer = composerFactory.createSourceWriter(ctx, printWriter);
injectorWriteContext = ginjectorFragmentContextFactory.create(bindings, fragmentPackageName,
writer);
}
示例13: setUp
import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Override
public void setUp() {
errorManager = new ErrorManager(TreeLogger.NULL);
}