01: package org.acm.seguin.pmd.cpd;
02:
03: import java.io.File;
04: import java.io.FilenameFilter;
05:
06: public class PHPLanguage implements Language {
07:
08: public static class PHPFileOrDirectoryFilter implements
09: FilenameFilter {
10: public boolean accept(File dir, String filename) {
11: return filename.endsWith("php")
12: || filename.endsWith("class")
13: || (new File(dir.getAbsolutePath()
14: + System.getProperty("file.separator")
15: + filename).isDirectory());
16: }
17: }
18:
19: public Tokenizer getTokenizer() {
20: return new PHPTokenizer();
21: }
22:
23: public FilenameFilter getFileFilter() {
24: return new PHPFileOrDirectoryFilter();
25: }
26: }
|