net.sourceforge.pmd.lang

## Class LanguageFilenameFilter

- java.lang.Object
- - net.sourceforge.pmd.lang.LanguageFilenameFilter

All Implemented Interfaces:
  FilenameFilter

    public class LanguageFilenameFilter
    extends Object
    implements FilenameFilter

This is an implementation of the `FilenameFilter` interface which compares a file against a collection of Languages to see if the any are applicable.

Author:
  Pieter_Van_Raemdonck - Application Engineers NV/SA - www.ae.be

### Constructor Summary

Constructors
Constructor and Description
`LanguageFilenameFilter(Language language)` Create a LanguageFilenameFilter for a single Language.
`LanguageFilenameFilter(Set<Language> languages)` Create a LanguageFilenameFilter for a List of Languages.

### Method Summary

Methods
`boolean` `accept(File dir, String name)` Check if a file should be checked by PMD.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### LanguageFilenameFilter

    public LanguageFilenameFilter(Language language)

Create a LanguageFilenameFilter for a single Language.

Parameters:
  `language` - The Language.

#### LanguageFilenameFilter

    public LanguageFilenameFilter(Set<Language> languages)

Create a LanguageFilenameFilter for a List of Languages.

Parameters:
  `languages` - The List of Languages.

### Method Detail

#### accept

    public boolean accept(File dir,
                 String name)

Check if a file should be checked by PMD.

Specified by:
  `accept` in interface `FilenameFilter`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`