public interface ItemInfo
GuiceBundle,
by classpath scan or by GuiceyBundle.
Multiple sources may register single item and even the same source could register it multiple times. Each entity will be actually registered once, but information about all registrations is stored and may be used for warnings reporting.
for list of available items| Modifier and Type | Method and Description |
|---|---|
ItemId |
getId()
Items could be registered by class and by instance.
|
int |
getIgnoresByScope(java.lang.Class<?> scope)
Shortcut for
getIgnoresByScope(ItemId). |
int |
getIgnoresByScope(ItemId scope)
Required to show ignored items in the same scope as actual registration.
|
ConfigItem |
getItemType() |
java.util.Set<ItemId> |
getRegisteredBy()
Configuration items may be registered by root application class, classpath scan or guicey bundle.
|
int |
getRegistrationAttempts()
It may be 0 for disabled items (e.g. installer disabled but never registered).
|
ItemId |
getRegistrationScope()
Item may be registered multiple times.
|
ConfigScope |
getRegistrationScopeType()
It is essentially the same as
getRegistrationScope(), but with generified guicey bundle scope. |
java.lang.Class<?> |
getType() |
boolean |
isRegistered()
Useful to recognize not registered info items appeared for example because of item disabling.
|
boolean |
isRegisteredDirectly() |
ItemId getId()
ConfigItem getItemType()
java.lang.Class<?> getType()
java.util.Set<ItemId> getRegisteredBy()
Application is stored as context.
For registration by classpath scan ClasspathScanner
is stored as context. For registrations by
GuiceyBundle, actual bundle class is stored
as context.
Bundle items may also have GuiceyBundleLookup as context classe for
bundles resolved by lookup mechanism.
May not contain elements if item was never registered, but for example, disabled.
To quick check if exact scope class is present use ItemId.from(class), which will match
any class instance related scope key.
for the list of all special scopesItemId getRegistrationScope()
DuplicateConfigDetector).
May be null for never registered but disabled items!
for all scopes performing registratoinConfigScope getRegistrationScopeType()
getRegistrationScope(), but with generified guicey bundle scope.
May be useful for generic reporting.int getRegistrationAttempts()
boolean isRegistered()
boolean isRegisteredDirectly()
GuiceBundle.Builder,
false otherwise.int getIgnoresByScope(ItemId scope)
When checked bundles by class only item (ItemId.from(Bundle.class)) it wil return sum
of registrations for all instances of type.
scope - scopeint getIgnoresByScope(java.lang.Class<?> scope)
getIgnoresByScope(ItemId).scope - scope type to check ignores