View Javadoc

1   package com.atlassian.plugin.predicate;
2   
3   import com.atlassian.plugin.ModuleDescriptor;
4   import com.atlassian.plugin.PluginAccessor;
5   
6   /**
7    * A {@link ModuleDescriptorPredicate} that matches enabled modules.
8    */
9   public class EnabledModulePredicate<T> implements ModuleDescriptorPredicate<T>
10  {
11      public EnabledModulePredicate()
12      {
13      }
14  
15      /**
16       * @deprecated Since 3.1.0, use {@link #EnabledModulePredicate()} instead.
17       */
18      @Deprecated
19      public EnabledModulePredicate(final PluginAccessor pluginAccessor)
20      {
21      }
22  
23      public boolean matches(final ModuleDescriptor<? extends T> moduleDescriptor)
24      {
25          return moduleDescriptor.isEnabled();
26      }
27  }