Class InstanceItemInfoImpl<T>
java.lang.Object
ru.vyarus.dropwizard.guice.module.context.info.impl.ItemInfoImpl
ru.vyarus.dropwizard.guice.module.context.info.impl.InstanceItemInfoImpl<T>
- Type Parameters:
T- instance type
- All Implemented Interfaces:
InstanceItemInfo<T>,ItemInfo
- Direct Known Subclasses:
BundleItemInfoImpl,ModuleItemInfoImpl
Instance item info implementation.
- Since:
- 04.07.2019
-
Field Summary
Fields inherited from class ru.vyarus.dropwizard.guice.module.context.info.impl.ItemInfoImpl
complete -
Constructor Summary
ConstructorsConstructorDescriptionInstanceItemInfoImpl(ConfigItem itemType, Class type) Create disable-only info (special constructor for disable-only items (without actual registration).InstanceItemInfoImpl(ConfigItem itemType, T instance) Create item. -
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.voidsetInstanceCount(int instanceCount) toString()Methods 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.ItemInfo
getId, getIgnoresByScope, getIgnoresByScope, getItemType, getRegisteredBy, getRegistrationAttempts, getRegistrationScope, getRegistrationScopeType, getType, isAllDataCollected, isRegistered, isRegisteredDirectly
-
Constructor Details
-
InstanceItemInfoImpl
Create disable-only info (special constructor for disable-only items (without actual registration).- Parameters:
itemType- item typetype- item class
-
InstanceItemInfoImpl
Create item.- Parameters:
itemType- item typeinstance- item instance
-
-
Method Details
-
getInstance
- Specified by:
getInstancein interfaceInstanceItemInfo<T>- Returns:
- configuration object instance
-
getInstanceCount
public int getInstanceCount()Description copied from interface:InstanceItemInfoFor 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.- Specified by:
getInstanceCountin interfaceInstanceItemInfo<T>- Returns:
- instance registration count number (starting from 0)
-
setInstanceCount
public void setInstanceCount(int instanceCount) - Parameters:
instanceCount- instances count
-
getDuplicates
Description copied from interface:InstanceItemInfoDuplicate instances are completely ignored. Information is provided for diagnostic.- Specified by:
getDuplicatesin interfaceInstanceItemInfo<T>- Returns:
- list of detected duplicate instances for current
-
toString
- Overrides:
toStringin classItemInfoImpl
-