View Javadoc

    1   /***
    2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
    3    */
    4   package net.sourceforge.pmd.cpd;
    5
    6   import net.sourceforge.pmd.SourceFileSelector;
    7
    8   import java.io.FilenameFilter;
    9
    10  public class JSPLanguage implements Language {
    11
    12      private JSPTokenizer tokenizer = new JSPTokenizer();
    13      private SourceFileSelector sourceFileSelector;
    14
    15      public JSPLanguage() {
    16          sourceFileSelector = new SourceFileSelector();
    17          sourceFileSelector.setSelectJavaFiles(false);
    18          sourceFileSelector.setSelectJspFiles(true);
    19      }
    20
    21      public Tokenizer getTokenizer() {
    22          return tokenizer;
    23      }
    24
    25      public FilenameFilter getFileFilter() {
    26          return new SourceFileOrDirectoryFilter(sourceFileSelector);
    27      }
    28  }
    29