View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.cpd;
5   
6   import java.util.Properties;
7   
8   /**
9    * Defines the Language module for C/C++
10   */
11  public class CPPLanguage extends AbstractLanguage {
12  
13      /**
14       * Creates a new instance of {@link CPPLanguage} with the default extensions for c/c++ files.
15       */
16      public CPPLanguage() {
17          super("C++", "cpp", new CPPTokenizer(), ".h", ".hpp", ".hxx", ".c", ".cpp", ".cxx", ".cc", ".C");
18      }
19      
20      /* (non-Javadoc)
21       * @see net.sourceforge.pmd.cpd.AbstractLanguage#setProperties(java.util.Properties)
22       */
23      @Override
24      public void setProperties(Properties properties) {
25          super.setProperties(properties);
26          ((CPPTokenizer)getTokenizer()).setProperties(properties);
27      }
28  }