Class GuiceModelParser
java.lang.Object
ru.vyarus.dropwizard.guice.debug.report.guice.util.GuiceModelParser
Guice introspection utils. Parse guice SPI model. Supports both elements from modules and injector bindings.
- Since:
- 14.08.2019
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<ModuleDeclaration>parse(com.google.inject.Injector injector, Collection<? extends com.google.inject.spi.Element> elements) Parse guice elements into modules tree.static BindingDeclarationparseElement(com.google.inject.Injector injector, com.google.inject.spi.Element element) Parse single guice element.
-
Method Details
-
parse
public static List<ModuleDeclaration> parse(com.google.inject.Injector injector, Collection<? extends com.google.inject.spi.Element> elements) Parse guice elements into modules tree. Only direct bindings are accepted. Supports both module elements and injector bindings (but result will slightly vary). JIT bindings are also grouped into special module.- Parameters:
injector- injector instanceelements- elements to analyze- Returns:
- tree of modules.
-
parseElement
public static BindingDeclaration parseElement(com.google.inject.Injector injector, com.google.inject.spi.Element element) Parse single guice element.- Parameters:
injector- injector instanceelement- element to analyze- Returns:
- parsed descriptor or null if element is not supported (or intentionally skipped)
-