View Javadoc

    1   package net.sourceforge.pmd.cpd;
    2
    3   import java.io.FilenameFilter;
    4   import java.util.Properties;
    5
    6   import net.sourceforge.pmd.util.filter.Filters;
    7
    8   public abstract class AbstractLanguage implements Language {
    9   	private final Tokenizer tokenizer;
    10  	private final FilenameFilter fileFilter;
    11
    12  	public AbstractLanguage(Tokenizer tokenizer, String... extensions) {
    13  		this.tokenizer = tokenizer;
    14  		fileFilter = Filters.toFilenameFilter(Filters.getFileExtensionOrDirectoryFilter(extensions));
    15  	}
    16
    17  	public FilenameFilter getFileFilter() {
    18  		return fileFilter;
    19  	}
    20
    21  	public Tokenizer getTokenizer() {
    22  		return tokenizer;
    23  	}
    24
    25  	public void setProperties(Properties properties) {
    26  	    // needs to be implemented by subclasses.
    27  	}
    28  }