Class GuiceModule

java.lang.Object
io.jooby.guice.GuiceModule
All Implemented Interfaces:
io.jooby.Extension

public class GuiceModule extends Object implements io.jooby.Extension
Guice module: https://jooby.io/modules/guice.

Jooby integrates the ServiceRegistry into the Guice framework.

Usage:


 {


   install(new GuiceModule());

 }

 
Require calls are going to be resolved by Guice now.
Since:
2.0.0
Author:
edgar
  • Constructor Summary

    Constructors
    Constructor
    Description
    GuiceModule(com.google.inject.Injector injector)
    Creates a new guice module using the given injector.
    GuiceModule(com.google.inject.Module... modules)
    Creates a new guice module.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    install(io.jooby.Jooby application)
     
    boolean
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GuiceModule

      public GuiceModule(@NonNull com.google.inject.Injector injector)
      Creates a new guice module using the given injector.
      Parameters:
      injector - Injector to use.
    • GuiceModule

      public GuiceModule(@NonNull com.google.inject.Module... modules)
      Creates a new guice module.
      Parameters:
      modules - Module to add.
  • Method Details

    • lateinit

      public boolean lateinit()
      Specified by:
      lateinit in interface io.jooby.Extension
    • install

      public void install(@NonNull io.jooby.Jooby application)
      Specified by:
      install in interface io.jooby.Extension