Class BundleItemInfoImpl<T>
java.lang.Object
ru.vyarus.dropwizard.guice.module.context.info.impl.ItemInfoImpl
ru.vyarus.dropwizard.guice.module.context.info.impl.InstanceItemInfoImpl<T>
ru.vyarus.dropwizard.guice.module.context.info.impl.BundleItemInfoImpl<T>
- Type Parameters:
T- instance type
- All Implemented Interfaces:
BundleItemInfo<T>,InstanceItemInfo<T>,ItemInfo,DisableSupport
- Direct Known Subclasses:
DropwizardBundleItemInfoImpl,GuiceyBundleItemInfoImpl
public abstract class BundleItemInfoImpl<T>
extends InstanceItemInfoImpl<T>
implements BundleItemInfo<T>
Bundle item info generic implementation.
- Since:
- 28.07.2019
-
Field Summary
Fields inherited from class ru.vyarus.dropwizard.guice.module.context.info.impl.ItemInfoImpl
complete -
Constructor Summary
ConstructorsConstructorDescriptionBundleItemInfoImpl(ConfigItem type, Class<?> item) Create disable-only item (only indicates disabling).BundleItemInfoImpl(ConfigItem type, T instance) Create bundle item. -
Method Summary
Modifier and TypeMethodDescriptionItem may be disabled either from root application class or fromGuiceyBundle.booleanItem is enabled if no one disable it (DisableSupport.getDisabledBy()is empty).Methods inherited from class ru.vyarus.dropwizard.guice.module.context.info.impl.InstanceItemInfoImpl
getDuplicates, getInstance, getInstanceCount, setInstanceCount, toStringMethods inherited from class ru.vyarus.dropwizard.guice.module.context.info.impl.ItemInfoImpl
countRegistrationAttempt, getId, getIgnoresByScope, getIgnoresByScope, getItemType, getRegisteredBy, getRegistrationAttempts, getRegistrationScope, getRegistrationScopeType, getType, isAllDataCollected, isRegistered, isRegisteredDirectlyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ru.vyarus.dropwizard.guice.module.context.info.BundleItemInfo
isDropwizard, isTransitiveMethods inherited from interface ru.vyarus.dropwizard.guice.module.context.info.InstanceItemInfo
getDuplicates, getInstance, getInstanceCountMethods inherited from interface ru.vyarus.dropwizard.guice.module.context.info.ItemInfo
getId, getIgnoresByScope, getIgnoresByScope, getItemType, getRegisteredBy, getRegistrationAttempts, getRegistrationScope, getRegistrationScopeType, getType, isAllDataCollected, isRegistered, isRegisteredDirectly
-
Constructor Details
-
BundleItemInfoImpl
Create disable-only item (only indicates disabling).- Parameters:
type- bundle typeitem- bundle class
-
BundleItemInfoImpl
Create bundle item.- Parameters:
type- bundle typeinstance- bundle instance
-
-
Method Details
-
getDisabledBy
Description copied from interface:DisableSupportItem may be disabled either from root application class or fromGuiceyBundle. For application,Applicationclass stored as context and for guicey bundle actual bundle instance id is stored.- Specified by:
getDisabledByin interfaceDisableSupport- Returns:
- contexts where item was disabled or empty collection
-
isEnabled
public boolean isEnabled()Description copied from interface:DisableSupportItem is enabled if no one disable it (DisableSupport.getDisabledBy()is empty).- Specified by:
isEnabledin interfaceDisableSupport- Returns:
- true if item enabled, false otherwise
-