View Javadoc
1   package com.atlassian.plugin.loaders.classloading;
2   
3   import org.slf4j.Logger;
4   import org.slf4j.LoggerFactory;
5   
6   import java.util.Collection;
7   import java.util.Collections;
8   
9   /**
10   * A {@link Scanner} which never finds anything.
11   *
12   * @since 3.0.16
13   */
14  public class EmptyScanner implements Scanner {
15      private static final Logger log = LoggerFactory.getLogger(EmptyScanner.class);
16  
17      public Collection<DeploymentUnit> scan() {
18          return Collections.emptyList();
19      }
20  
21      public Collection<DeploymentUnit> getDeploymentUnits() {
22          return Collections.emptyList();
23      }
24  
25      public void reset() {
26          // Nothing to reset
27      }
28  
29      public void remove(final DeploymentUnit unit) {
30          // Nothing to remove, but the caller shouldn't be trying really, so WARN - it's
31          // recoverable, but probably indicates a bug
32          log.warn("EmptyScanner.remove called for {}", unit);
33      }
34  }