View Javadoc
1   package com.atlassian.plugin.loaders.classloading;
2   
3   import com.atlassian.plugin.PluginException;
4   
5   import java.util.Collection;
6   
7   import static com.google.common.base.Preconditions.checkNotNull;
8   
9   /**
10   * Forwarding delegate for a {@link Scanner}.
11   *
12   * @since 3.0.8
13   */
14  public class ForwardingScanner implements Scanner {
15      /**
16       * The delegate to forward calls to.
17       */
18      private final Scanner delegate;
19  
20      public ForwardingScanner(Scanner delegate) {
21          this.delegate = checkNotNull(delegate);
22      }
23  
24      public Collection<DeploymentUnit> scan() {
25          return delegate.scan();
26      }
27  
28      public Collection<DeploymentUnit> getDeploymentUnits() {
29          return delegate.getDeploymentUnits();
30      }
31  
32      public void reset() {
33          delegate.reset();
34      }
35  
36      public void remove(DeploymentUnit unit) throws PluginException {
37          delegate.remove(unit);
38      }
39  }