CppHandler.java
01 package net.sourceforge.pmd.lang.cpp;
02 
03 import java.io.Writer;
04 
05 import net.sourceforge.pmd.lang.DataFlowHandler;
06 import net.sourceforge.pmd.lang.LanguageVersionHandler;
07 import net.sourceforge.pmd.lang.Parser;
08 import net.sourceforge.pmd.lang.VisitorStarter;
09 import net.sourceforge.pmd.lang.XPathHandler;
10 import net.sourceforge.pmd.lang.rule.RuleViolationFactory;
11 
12 /**
13  * Implementation of LanguageVersionHandler for the C++ Language.
14  */
15 public class CppHandler implements LanguageVersionHandler {
16 
17     public DataFlowHandler getDataFlowHandler() {
18   return DataFlowHandler.DUMMY;
19     }
20 
21     public XPathHandler getXPathHandler() {
22   return XPathHandler.DUMMY;
23     }
24 
25     public RuleViolationFactory getRuleViolationFactory() {
26   throw new UnsupportedOperationException("getRuleViolationFactory() is not supported for C++");
27     }
28 
29     public Parser getParser() {
30   return new CppParser();
31     }
32 
33     public VisitorStarter getDataFlowFacade() {
34   return VisitorStarter.DUMMY;
35     }
36 
37     public VisitorStarter getSymbolFacade() {
38   return VisitorStarter.DUMMY;
39     }
40 
41     public VisitorStarter getTypeResolutionFacade(ClassLoader classLoader) {
42   return VisitorStarter.DUMMY;
43     }
44 
45     public VisitorStarter getDumpFacade(final Writer writer, final String prefix, final boolean recurse) {
46   return VisitorStarter.DUMMY;
47     }
48 }