public class ModuleDescriptorCache<T extends com.atlassian.plugin.ModuleDescriptor<?>> extends Object
PluginAccessor.getEnabledModuleDescriptorsByClass(Class)
.Modifier and Type | Class and Description |
---|---|
static interface |
ModuleDescriptorCache.Initializer<T>
Implementations of this interface are used to initialize a
ModuleDescriptorCache |
Constructor and Description |
---|
ModuleDescriptorCache(Class<? extends T> moduleDescriptorClass) |
ModuleDescriptorCache(Class<? extends T> moduleDescriptorClass,
com.atlassian.plugin.predicate.ModuleDescriptorPredicate moduleDescriptorPredicate) |
Modifier and Type | Method and Description |
---|---|
Collection<T> |
getDescriptors()
Returns the module descriptors currently in the cache.
|
void |
initialize(ModuleDescriptorCache.Initializer<T> initializer)
Initialize the cache with the module descriptors returned by the initializer.
|
void |
pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
Removes module descriptors from the cache when plugin modules are disabled.
|
void |
pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
Adds module descriptors to the cache when plugin modules are enabled.
|
public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
public Collection<T> getDescriptors()
public void initialize(ModuleDescriptorCache.Initializer<T> initializer)
Copyright © 2003–2016 Atlassian. All rights reserved.