Class ExtensionsSupport
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.module.installer.internal.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.
-
-
-
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 contexttype
- extension classfromScan
- 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 withInvisibleForScanner
are ignored.- Parameters:
context
- configuration contexttype
- extension typemanualBinding
- guice binding from moduletopDeclarationModule
- 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 contextinjector
- guice injector
-
-