Class 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
  • Constructor Details

    • BundleItemInfoImpl

      public BundleItemInfoImpl(ConfigItem type, Class<?> item)
      Create disable-only item (only indicates disabling).
      Parameters:
      type - bundle type
      item - bundle class
    • BundleItemInfoImpl

      public BundleItemInfoImpl(ConfigItem type, T instance)
      Create bundle item.
      Parameters:
      type - bundle type
      instance - bundle instance
  • Method Details

    • getDisabledBy

      public Set<ItemId> getDisabledBy()
      Description copied from interface: DisableSupport
      Item may be disabled either from root application class or from GuiceyBundle. For application, Application class stored as context and for guicey bundle actual bundle instance id is stored.
      Specified by:
      getDisabledBy in interface DisableSupport
      Returns:
      contexts where item was disabled or empty collection
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: DisableSupport
      Item is enabled if no one disable it (DisableSupport.getDisabledBy() is empty).
      Specified by:
      isEnabled in interface DisableSupport
      Returns:
      true if item enabled, false otherwise