Class InternalLooseImportBindingBuilder<T>

java.lang.Object
org.jdbi.v3.guice.internal.InternalLooseImportBindingBuilder<T>
All Implemented Interfaces:
com.google.inject.binder.ScopedBindingBuilder

public final class InternalLooseImportBindingBuilder<T> extends Object implements com.google.inject.binder.ScopedBindingBuilder
Binding builder for loose bindings (with optional default).
  • Field Details

  • Constructor Details

    • InternalLooseImportBindingBuilder

      private InternalLooseImportBindingBuilder(com.google.inject.binder.LinkedBindingBuilder<T> binder, com.google.inject.Key<T> concreteType)
  • Method Details

    • createLooseBinding

      public static <T> InternalLooseImportBindingBuilder<T> createLooseBinding(com.google.inject.binder.LinkedBindingBuilder<T> binder, com.google.inject.Key<T> concreteType)
    • withDefault

      public InternalLooseImportBindingBuilder<T> withDefault(@Nullable T value)
      If the requested binding does not exist, bind the given default value.
    • to

      public com.google.inject.binder.ScopedBindingBuilder to(Class<? extends T> clazz)
      Bind a different type as the given binding. This allows binding e.g. implementations to interface types.
    • to

      public com.google.inject.binder.ScopedBindingBuilder to(com.google.inject.TypeLiteral<? extends T> type)
      Bind a different type as the given binding. This allows binding e.g. implementations to interface types.
    • in

      public void in(Class<? extends Annotation> scopeAnnotation)
      Specified by:
      in in interface com.google.inject.binder.ScopedBindingBuilder
    • in

      public void in(com.google.inject.Scope scope)
      Specified by:
      in in interface com.google.inject.binder.ScopedBindingBuilder
    • asEagerSingleton

      public void asEagerSingleton()
      Specified by:
      asEagerSingleton in interface com.google.inject.binder.ScopedBindingBuilder