Class ExtensionsSupport


  • public final class ExtensionsSupport
    extends java.lang.Object
    Extensions installation utility.
    Since:
    01.09.2014
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void installExtensions​(ConfigurationContext context, com.google.inject.Injector injector)
      Installs extensions by instance and type.
      static boolean registerExtension​(ConfigurationContext context, java.lang.Class<?> type, boolean fromScan)
      Register extension (manual or from classpath scan).
      static boolean registerExtensionBinding​(ConfigurationContext context, java.lang.Class<?> type, com.google.inject.Binding<?> manualBinding, java.lang.Class<? extends com.google.inject.Module> topDeclarationModule)
      Register extension from guice binding.
      • Methods inherited from class java.lang.Object

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

      • registerExtension

        public static boolean registerExtension​(ConfigurationContext context,
                                                java.lang.Class<?> type,
                                                boolean fromScan)
        Register extension (manual or from classpath scan).
        Parameters:
        context - configuration context
        type - extension class
        fromScan - true for classpath scan
        Returns:
        true if extension recognized by installers, false otherwise
      • registerExtensionBinding

        public static boolean registerExtensionBinding​(ConfigurationContext context,
                                                       java.lang.Class<?> type,
                                                       com.google.inject.Binding<?> manualBinding,
                                                       java.lang.Class<? extends com.google.inject.Module> topDeclarationModule)
        Register extension from guice binding. Extensions annotated with InvisibleForScanner are ignored.
        Parameters:
        context - configuration context
        type - extension type
        manualBinding - guice binding from module
        topDeclarationModule - top declaration module (which was manually added by user)
        Returns:
        true if extension recognized by installers, false otherwise
      • installExtensions

        public static void installExtensions​(ConfigurationContext context,
                                             com.google.inject.Injector injector)
        Installs extensions by instance and type. Note that jersey extensions will be processed later after jersey startup.
        Parameters:
        context - configuration context
        injector - guice injector