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


Java ModuleAnnotatedMethodScanner类代码示例

本文整理汇总了Java中com.google.inject.spi.ModuleAnnotatedMethodScanner的典型用法代码示例。如果您正苦于以下问题:Java ModuleAnnotatedMethodScanner类的具体用法?Java ModuleAnnotatedMethodScanner怎么用?Java ModuleAnnotatedMethodScanner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ModuleAnnotatedMethodScanner类属于com.google.inject.spi包,在下文中一共展示了ModuleAnnotatedMethodScanner类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: scanner

import com.google.inject.spi.ModuleAnnotatedMethodScanner; //导入依赖的package包/类
/**
 * @deprecated This method returns an empty scanner since the preexisting functionality is
 *     installed by default.
 */
@Deprecated
public static ModuleAnnotatedMethodScanner scanner() {
  return new ModuleAnnotatedMethodScanner() {
    @Override
    public Set<? extends Class<? extends Annotation>> annotationClasses() {
      return ImmutableSet.of();
    }

    @Override
    public <T> Key<T> prepareMethod(
        Binder binder, Annotation annotation, Key<T> key, InjectionPoint injectionPoint) {
      throw new IllegalStateException("Unexpected annotation: " + annotation);
    }
  };
}
 
开发者ID:google,项目名称:guice,代码行数:20,代码来源:MultibindingsScanner.java

示例2: ProviderMethodsModule

import com.google.inject.spi.ModuleAnnotatedMethodScanner; //导入依赖的package包/类
private ProviderMethodsModule(
    Object delegate, boolean skipFastClassGeneration, ModuleAnnotatedMethodScanner scanner) {
  this.delegate = checkNotNull(delegate, "delegate");
  this.typeLiteral = TypeLiteral.get(this.delegate.getClass());
  this.skipFastClassGeneration = skipFastClassGeneration;
  this.scanner = scanner;
}
 
开发者ID:google,项目名称:guice,代码行数:8,代码来源:ProviderMethodsModule.java

示例3: forObject

import com.google.inject.spi.ModuleAnnotatedMethodScanner; //导入依赖的package包/类
private static Module forObject(
    Object object, boolean skipFastClassGeneration, ModuleAnnotatedMethodScanner scanner) {
  // avoid infinite recursion, since installing a module always installs itself
  if (object instanceof ProviderMethodsModule) {
    return Modules.EMPTY_MODULE;
  }

  return new ProviderMethodsModule(object, skipFastClassGeneration, scanner);
}
 
开发者ID:google,项目名称:guice,代码行数:10,代码来源:ProviderMethodsModule.java

示例4: scanModulesForAnnotatedMethods

import com.google.inject.spi.ModuleAnnotatedMethodScanner; //导入依赖的package包/类
@Override
default void scanModulesForAnnotatedMethods(final ModuleAnnotatedMethodScanner scanner) {
  this.binder().scanModulesForAnnotatedMethods(scanner);
}
 
开发者ID:KyoriPowered,项目名称:violet,代码行数:5,代码来源:ForwardingBinder.java

示例5: forModule

import com.google.inject.spi.ModuleAnnotatedMethodScanner; //导入依赖的package包/类
/** Returns a module which creates bindings methods in the module that match the scanner. */
public static Module forModule(Object module, ModuleAnnotatedMethodScanner scanner) {
  return forObject(module, false, scanner);
}
 
开发者ID:google,项目名称:guice,代码行数:5,代码来源:ProviderMethodsModule.java

示例6: scanModulesForAnnotatedMethods

import com.google.inject.spi.ModuleAnnotatedMethodScanner; //导入依赖的package包/类
/**
 * Adds a scanner that will look in all installed modules for annotations the scanner can parse,
 * and binds them like {@literal @}Provides methods. Scanners apply to all modules installed in
 * the injector. Scanners installed in child injectors or private modules do not impact modules in
 * siblings or parents, however scanners installed in parents do apply to all child injectors and
 * private modules.
 *
 * @since 4.0
 */
void scanModulesForAnnotatedMethods(ModuleAnnotatedMethodScanner scanner);
 
开发者ID:google,项目名称:guice,代码行数:11,代码来源:Binder.java


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