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(java.io.Reader source)Subclass should override this method to modify the JavaParser as needed.net.sourceforge.pmd.lang.TokenManagercreateTokenManager(java.io.Reader source)java.util.Map<java.lang.Integer,java.lang.String>getSuppressMap()net.sourceforge.pmd.lang.ast.Nodeparse(java.lang.String fileName, java.io.Reader source)
-
-
-
Method Detail
-
createTokenManager
public net.sourceforge.pmd.lang.TokenManager createTokenManager(java.io.Reader source)
- Specified by:
createTokenManagerin classnet.sourceforge.pmd.lang.AbstractParser
-
createJavaParser
protected JavaParser createJavaParser(java.io.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(java.lang.String fileName, java.io.Reader source) throws ParseException- Throws:
ParseException
-
getSuppressMap
public java.util.Map<java.lang.Integer,java.lang.String> getSuppressMap()
-
-