Package net.sourceforge.pmd.lang.java
Class AbstractJavaParser
- java.lang.Object
-
- net.sourceforge.pmd.lang.AbstractParser
-
- net.sourceforge.pmd.lang.java.AbstractJavaParser
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.Parser
- Direct Known Subclasses:
JavaLanguageParser
public abstract class AbstractJavaParser extends net.sourceforge.pmd.lang.AbstractParserThis is a generic Java specific implementation of the Parser interface. It creates a JavaParser instance, and sets the exclude marker. It also exposes the exclude map from the JavaParser instance.- See Also:
AbstractParser,JavaParser
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaParser(net.sourceforge.pmd.lang.ParserOptions parserOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanParse()protected JavaParsercreateJavaParser(Reader source)Subclass should override this method to modify the JavaParser as needed.net.sourceforge.pmd.lang.TokenManagercreateTokenManager(Reader source)Map<Integer,String>getSuppressMap()net.sourceforge.pmd.lang.ast.Nodeparse(String fileName, Reader source)
-
-
-
Method Detail
-
createTokenManager
public net.sourceforge.pmd.lang.TokenManager createTokenManager(Reader source)
- Specified by:
createTokenManagerin classnet.sourceforge.pmd.lang.AbstractParser
-
createJavaParser
protected JavaParser createJavaParser(Reader source) throws ParseException
Subclass should override this method to modify the JavaParser as needed.- Throws:
ParseException
-
canParse
public boolean canParse()
-
parse
public net.sourceforge.pmd.lang.ast.Node parse(String fileName, Reader source) throws ParseException
- Throws:
ParseException
-
-