当前位置: 首页>>代码示例>>Java>>正文


Java ErrorManager类代码示例

本文整理汇总了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);
  }
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:21,代码来源:ProviderMethodBinding.java

示例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;
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:19,代码来源:GinjectorFragmentContext.java

示例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;
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:22,代码来源:GinjectorBindingsOutputter.java

示例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);
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:25,代码来源:BindingPositionerTest.java

示例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);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:39,代码来源:GinjectorFragmentOutputter.java

示例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;
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:8,代码来源:UnresolvedBindingValidator.java

示例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);
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:9,代码来源:ExposedChildBinding.java

示例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;
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:12,代码来源:BindingFactoryImpl.java

示例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);
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:9,代码来源:ParentBinding.java

示例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);
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:9,代码来源:EagerCycleFinderTest.java

示例11: EagerCycleFinder

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

示例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);
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:50,代码来源:GinjectorFragmentOutputter.java

示例13: setUp

import com.google.gwt.inject.rebind.ErrorManager; //导入依赖的package包/类
@Override
public void setUp() {
  errorManager = new ErrorManager(TreeLogger.NULL);
}
 
开发者ID:google-code-export,项目名称:google-gin,代码行数:5,代码来源:ProviderMethodBindingTest.java


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