View Javadoc

1   /*
2    * Copyright 2007-2013 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.exceptions.report.scan;
17  
18  import java.io.File;
19  
20  import org.apache.tools.ant.DirectoryScanner;
21  import org.apache.tools.ant.types.ZipScanner;
22  
23  /**
24   * Creates directory scanners.
25   */
26  public final class ZipScannerFactory extends AbstractScannerFactory
27  {
28    // ********************************* Fields *********************************
29  
30    // --- constants ------------------------------------------------------------
31  
32    // --- members --------------------------------------------------------------
33  
34    // ****************************** Initializer *******************************
35  
36    // ****************************** Constructors ******************************
37  
38    /**
39     * Constructor.
40     *
41     * @param includes the includes for the scanner.
42     * @param excludes the excludes for the scanner.
43     * @see de.smartics.exceptions.report.scan.analysis.javadoc.scan.layout.AbstractScannerFactory#AbstractScannerFactory(String[],
44     *      String[])
45     */
46    public ZipScannerFactory(final String[] includes, final String[] excludes)
47    {
48      super(includes, excludes);
49    }
50  
51    // ****************************** Inner Classes *****************************
52  
53    // ********************************* Methods ********************************
54  
55    // --- init -----------------------------------------------------------------
56  
57    // --- get&set --------------------------------------------------------------
58  
59    // --- business -------------------------------------------------------------
60  
61    @Override
62    public DirectoryScanner createScanner(final File root)
63    {
64      final ZipScanner scanner = new ZipScanner();
65      scanner.setSrc(root);
66      configureAndScan(scanner);
67      return scanner;
68    }
69  
70    // --- object basics --------------------------------------------------------
71  
72  }