Class ContextTreeConfig
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.debug.report.tree.ContextTreeConfig
-
public final class ContextTreeConfig extends java.lang.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:
for usage
-
-
Constructor Summary
Constructors Constructor Description ContextTreeConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<ConfigItem>
getHiddenItems()
java.util.Set<java.lang.Class<?>>
getHiddenScopes()
ContextTreeConfig
hideCommands()
Hide commands registrations (commands registered only by classpath scan).ContextTreeConfig
hideDisables()
Hide disable mentions.ContextTreeConfig
hideDuplicateRegistrations()
By default, duplicate registrations are shown with "IGNORED" marker.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).ContextTreeConfig
hideExtensions()
Hide extensions registrations.ContextTreeConfig
hideInstallers()
Hide installers registrations.ContextTreeConfig
hideModules()
Hide guice modules registrations.ContextTreeConfig
hideNotUsedInstallers()
Hides installers, which was not used (no extensions installed by this installer).ContextTreeConfig
hideScopes(java.lang.Class<?>... avoid)
Hide some scopes from report.boolean
isHideDisables()
boolean
isHideDuplicateRegistrations()
boolean
isHideEmptyBundles()
boolean
isHideNotUsedInstallers()
-
-
-
Method Detail
-
getHiddenItems
public java.util.Set<ConfigItem> getHiddenItems()
- Returns:
- set with item type to avoid printing or empty set
-
getHiddenScopes
public java.util.Set<java.lang.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(java.lang.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:
for more info about scopes
-
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
-
-