for (AddonDependencyEntry entry : entries)
{
Set<AddonView> views = stateManager.getViewsOf(addon);
AddonId dependencyId = stateManager.resolveAddonId(views, entry.getName());
Addon dependency = null;
if (dependencyId != null)
dependency = lifecycleManager.getAddon(views.iterator().next(), dependencyId);
if (dependency == null || dependency.getStatus().isMissing())
{
if (!entry.isOptional())
{
result.add(new MissingAddonDependencyImpl(entry));
}