Class ContextTreeConfig

java.lang.Object
ru.vyarus.dropwizard.guice.debug.report.tree.ContextTreeConfig

public final class ContextTreeConfig extends Object
Configuration tree reporting configuration. Tree configuration is based on restriction: by default everything is showed and additional configuration could only reduce displayed items. Configuration could be performed in chained fashion:

     TreeConfig config = new TreeConfig()
          .hideScopes(CoreInstallersBundle.class)
          .hideModules()
          .hideDisables()
 
Since:
17.07.2016
See Also:
  • Constructor Details

    • ContextTreeConfig

      public ContextTreeConfig()
  • Method Details

    • getHiddenItems

      public Set<ConfigItem> getHiddenItems()
      Returns:
      set with item type to avoid printing or empty set
    • getHiddenScopes

      public Set<Class<?>> getHiddenScopes()
      Returns:
      set of scopes to avoid printing or empty set
    • isHideDisables

      public boolean isHideDisables()
      Returns:
      true to hide disable mentions, false otherwise
    • isHideNotUsedInstallers

      public boolean isHideNotUsedInstallers()
      Returns:
      true to hide installers which did not install any extensions, false otherwise
    • isHideDuplicateRegistrations

      public boolean isHideDuplicateRegistrations()
      Returns:
      true to hide duplicate items registrations, false otherwise
    • isHideEmptyBundles

      public boolean isHideEmptyBundles()
      Returns:
      true to avoid showing empty bundles, false to always show bundles
    • hideModules

      public ContextTreeConfig hideModules()
      Hide guice modules registrations.
      Returns:
      config instance for chained calls
    • hideInstallers

      public ContextTreeConfig hideInstallers()
      Hide installers registrations.
      Returns:
      config instance for chained calls
    • hideExtensions

      public ContextTreeConfig hideExtensions()
      Hide extensions registrations.
      Returns:
      config instance for chained calls
    • hideCommands

      public ContextTreeConfig hideCommands()
      Hide commands registrations (commands registered only by classpath scan).
      Returns:
      config instance for chained calls
    • hideScopes

      public ContextTreeConfig hideScopes(Class<?>... avoid)
      Hide some scopes from report.

      Warning: this can remove entire subtrees (for example, by hiding bundle which installs other bundles)

      For showing only one special scope use ConfigScope.allExcept(ru.vyarus.dropwizard.guice.module.context.ConfigScope).

      Parameters:
      avoid - scopes to avoid printing
      Returns:
      config instance for chained calls
      See Also:
    • hideDisables

      public ContextTreeConfig hideDisables()
      Hide disable mentions.
      Returns:
      config instance for chained calls
    • hideNotUsedInstallers

      public ContextTreeConfig hideNotUsedInstallers()
      Hides installers, which was not used (no extensions installed by this installer).
      Returns:
      config instance for chained calls
    • hideDuplicateRegistrations

      public ContextTreeConfig hideDuplicateRegistrations()
      By default, duplicate registrations are shown with "IGNORED" marker. Hiding duplicates removes these lines from report.
      Returns:
      config instance for chained calls
    • hideEmptyBundles

      public ContextTreeConfig hideEmptyBundles()
      By default, if bundle does not contain registrations (or all registrations were filtered by config) bundle is still shown (as leaf, without subtree). This option hides such visually "empty" bundles.
      Returns:
      config instance for chained calls