Interface InstanceItemInfo<T>
- Type Parameters:
T- contained instance type
- All Superinterfaces:
ItemInfo
- All Known Subinterfaces:
BundleItemInfo<T>,DropwizardBundleItemInfo,GuiceyBundleItemInfo,ModuleItemInfo
- All Known Implementing Classes:
BundleItemInfoImpl,DropwizardBundleItemInfoImpl,GuiceyBundleItemInfoImpl,InstanceItemInfoImpl,ModuleItemInfoImpl
Base interface for instance configurations (bundles, modules). Multiple instances of the same type could be
actually registered and different objects will have different item info objects. Only direct registrations
of the same instance or equal objects will be considered as duplicate (second registration attempt will be just
registered in existing item info).
- Since:
- 03.07.2019
-
Method Summary
Modifier and TypeMethodDescriptionDuplicate instances are completely ignored.intFor example, if multiple bundles registered:.bundles(new Bundle(), new Bundle(), new Bundle()then their counts would be 1, 2 and 3 in order of registration.Methods inherited from interface ru.vyarus.dropwizard.guice.module.context.info.ItemInfo
getId, getIgnoresByScope, getIgnoresByScope, getItemType, getRegisteredBy, getRegistrationAttempts, getRegistrationScope, getRegistrationScopeType, getType, isAllDataCollected, isRegistered, isRegisteredDirectly
-
Method Details
-
getInstance
T getInstance()- Returns:
- configuration object instance
-
getInstanceCount
int getInstanceCount()For example, if multiple bundles registered:.bundles(new Bundle(), new Bundle(), new Bundle()then their counts would be 1, 2 and 3 in order of registration. For the same instances counts will be the same. This number is required to differentiate instances in reporting.- Returns:
- instance registration count number (starting from 0)
-
getDuplicates
Duplicate instances are completely ignored. Information is provided for diagnostic.- Returns:
- list of detected duplicate instances for current
-