View Javadoc

1   package net.sourceforge.pmd.cpd;
2   
3   import java.io.FilenameFilter;
4   
5   import net.sourceforge.pmd.util.filter.Filters;
6   
7   public abstract class AbstractLanguage implements Language {
8   	private final Tokenizer tokenizer;
9   	private final FilenameFilter fileFilter;
10  
11  	public AbstractLanguage(Tokenizer tokenizer, String... extensions) {
12  		this.tokenizer = tokenizer;
13  		fileFilter = Filters.toFilenameFilter(Filters.getFileExtensionOrDirectoryFilter(extensions));
14  	}
15  
16  	public FilenameFilter getFileFilter() {
17  		return fileFilter;
18  	}
19  
20  	public Tokenizer getTokenizer() {
21  		return tokenizer;
22  	}
23  }