Class ProviderMethodsModule

java.lang.Object
org.elasticsearch.common.inject.internal.ProviderMethodsModule
All Implemented Interfaces:
Module

public final class ProviderMethodsModule
extends java.lang.Object
implements Module
Creates bindings to methods annotated with @Provides. Use the scope and binding annotations on the provider method to configure the binding.
  • Method Summary

    Modifier and Type Method Description
    void configure​(Binder binder)
    Contributes bindings and other configurations for this module to binder.
    boolean equals​(java.lang.Object o)  
    static Module forModule​(Module module)
    Returns a module which creates bindings for provider methods from the given module.
    static Module forObject​(java.lang.Object object)
    Returns a module which creates bindings for provider methods from the given object.
    java.util.List<ProviderMethod<?>> getProviderMethods​(Binder binder)  
    int hashCode()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • forModule

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

      public static Module forObject​(java.lang.Object object)
      Returns a module which creates bindings for provider methods from the given object. This is useful notably for GIN
    • 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
    • getProviderMethods

      public java.util.List<ProviderMethod<?>> getProviderMethods​(Binder binder)
    • 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