Class CheckedProviderMethodsModule

  • All Implemented Interfaces:
    Module

    final class CheckedProviderMethodsModule
    extends java.lang.Object
    implements Module
    Creates bindings to methods annotated with @CheckedProvides. Use the scope and binding annotations on the provider method to configure the binding.
    • Field Detail

      • LOGGER_KEY

        private static final Key<java.util.logging.Logger> LOGGER_KEY
      • delegate

        private final java.lang.Object delegate
      • typeLiteral

        private final TypeLiteral<?> typeLiteral
    • Constructor Detail

      • CheckedProviderMethodsModule

        private CheckedProviderMethodsModule​(java.lang.Object delegate)
    • Method Detail

      • forModule

        static Module forModule​(Module module)
        Returns a module which creates bindings for provider methods from the given module.
      • configure

        public void configure​(Binder binder)
        Description copied from interface: Module
        Contributes bindings and other configurations for this module to binder.

        Do not invoke this method directly to install submodules. Instead use Binder.install(Module), which ensures that provider methods are discovered.

        Specified by:
        configure in interface Module
      • getKey

        <T> Key<T> getKey​(Errors errors,
                          TypeLiteral<T> type,
                          java.lang.reflect.Member member,
                          java.lang.annotation.Annotation[] annotations)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object