Class Injectors


  • public final class Injectors
    extends java.lang.Object

    Utility class for working with Injectors and Guice in general.

    Since:
    1.2
    Version:
    2.2.1
    Author:
    Michael Grove
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> void install​(com.google.inject.Binder theBinder, java.lang.Class<T> theClass)  
      static <T> java.lang.Iterable<? extends T> instancesOf​(com.google.inject.Injector theInjector, java.lang.Class<T> theClass)  
      static void prettyPrintErrors​(java.lang.Iterable<com.google.inject.spi.Message> theErrors)  
      static <T> java.lang.Iterable<com.google.inject.Provider<T>> providers​(com.google.inject.Injector theInjector, java.lang.Class<T> theClass)  
      static <T> java.lang.Iterable<com.google.inject.Provider<T>> providers​(java.util.List<com.google.inject.Binding<T>> theBindingsByType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • instancesOf

        public static <T> java.lang.Iterable<? extends T> instancesOf​(com.google.inject.Injector theInjector,
                                                                      java.lang.Class<T> theClass)
      • providers

        public static <T> java.lang.Iterable<com.google.inject.Provider<T>> providers​(com.google.inject.Injector theInjector,
                                                                                      java.lang.Class<T> theClass)
      • providers

        public static <T> java.lang.Iterable<com.google.inject.Provider<T>> providers​(java.util.List<com.google.inject.Binding<T>> theBindingsByType)
      • prettyPrintErrors

        public static void prettyPrintErrors​(java.lang.Iterable<com.google.inject.spi.Message> theErrors)
      • install

        public static <T> void install​(com.google.inject.Binder theBinder,
                                       java.lang.Class<T> theClass)