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