Class GuiceApplicationBuilder

java.lang.Object
play.inject.guice.GuiceBuilder<GuiceApplicationBuilder,play.api.inject.guice.GuiceApplicationBuilder>
play.inject.guice.GuiceApplicationBuilder

public final class GuiceApplicationBuilder extends GuiceBuilder<GuiceApplicationBuilder,play.api.inject.guice.GuiceApplicationBuilder>
  • Constructor Details

    • GuiceApplicationBuilder

      public GuiceApplicationBuilder()
  • Method Details

    • fromScalaBuilder

      public static GuiceApplicationBuilder fromScalaBuilder(play.api.inject.guice.GuiceApplicationBuilder builder)
    • withConfigLoader

      public GuiceApplicationBuilder withConfigLoader(Function<Environment,com.typesafe.config.Config> load)
      Set the initial configuration loader. Overrides the default or any previously configured values.
      Parameters:
      load - the configuration loader
      Returns:
      the configured application builder
    • loadConfig

      public GuiceApplicationBuilder loadConfig(com.typesafe.config.Config conf)
      Set the initial configuration. Overrides the default or any previously configured values.
      Parameters:
      conf - the configuration
      Returns:
      the configured application builder
    • withModuleLoader

      public GuiceApplicationBuilder withModuleLoader(BiFunction<Environment,com.typesafe.config.Config,List<play.api.inject.guice.GuiceableModule>> loader)
      Set the module loader. Overrides the default or any previously configured values.
      Parameters:
      loader - the configuration
      Returns:
      the configured application builder
    • load

      public GuiceApplicationBuilder load(play.api.inject.guice.GuiceableModule... modules)
      Override the module loader with the given guiceable modules.
      Parameters:
      modules - the set of overriding modules
      Returns:
      an application builder that incorporates the overrides
    • load

      public GuiceApplicationBuilder load(com.google.inject.Module... modules)
      Override the module loader with the given Guice modules.
      Parameters:
      modules - the set of overriding modules
      Returns:
      an application builder that incorporates the overrides
    • load

      public GuiceApplicationBuilder load(play.api.inject.Module... modules)
      Override the module loader with the given Play modules.
      Parameters:
      modules - the set of overriding modules
      Returns:
      an application builder that incorporates the overrides
    • load

      public GuiceApplicationBuilder load(play.api.inject.Binding<?>... bindings)
      Override the module loader with the given Play bindings.
      Parameters:
      bindings - the set of binding override
      Returns:
      an application builder that incorporates the overrides
    • build

      public Application build()
      Create a new Play Application using this configured builder.
      Returns:
      the application
    • newBuilder

      protected GuiceApplicationBuilder newBuilder(play.api.inject.guice.GuiceApplicationBuilder builder)
      Implementation of Self creation for GuiceBuilder.
      Specified by:
      newBuilder in class GuiceBuilder<GuiceApplicationBuilder,play.api.inject.guice.GuiceApplicationBuilder>
      Returns:
      the application builder