View Javadoc

1   package com.atlassian.plugin.loaders.classloading;
2   
3   import java.util.Collection;
4   
5   import com.atlassian.plugin.PluginException;
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      private final Scanner delegate;
18  
19      public ForwardingScanner(Scanner delegate)
20      {
21          this.delegate = checkNotNull(delegate);
22      }
23  
24      public Collection<DeploymentUnit> scan()
25      {
26          return delegate.scan();
27      }
28  
29      public Collection<DeploymentUnit> getDeploymentUnits()
30      {
31          return delegate.getDeploymentUnits();
32      }
33  
34      public void reset()
35      {
36          delegate.reset();
37      }
38  
39      public void remove(DeploymentUnit unit) throws PluginException
40      {
41          delegate.remove(unit);
42      }
43  }