Class GuiceModelParser
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.debug.report.guice.util.GuiceModelParser
-
public final class GuiceModelParser extends java.lang.Object
Guice introspection utils. Parse guice SPI model. Supports both elements from modules and injector bindings.- Since:
- 14.08.2019
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<ModuleDeclaration>
parse(com.google.inject.Injector injector, java.util.Collection<? extends com.google.inject.spi.Element> elements)
Parse guice elements into modules tree.static BindingDeclaration
parseElement(com.google.inject.Injector injector, com.google.inject.spi.Element element)
Parse single guice element.
-
-
-
Method Detail
-
parse
public static java.util.List<ModuleDeclaration> parse(com.google.inject.Injector injector, java.util.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)
-
-