public abstract class AbstractJavaParser extends AbstractParser
AbstractParser,
JavaParserparserOptions| Constructor and Description |
|---|
AbstractJavaParser(ParserOptions parserOptions) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canParse()
Indicates if this parser can actual parse, or if it can only tokenize.
|
protected JavaParser |
createJavaParser(Reader source)
Subclass should override this method to modify the JavaParser as needed.
|
TokenManager |
createTokenManager(Reader source) |
Map<Integer,String> |
getSuppressMap() |
Node |
parse(String fileName,
Reader source)
Parse source code and return the root node of the AST.
|
getParserOptions, getTokenManagerpublic AbstractJavaParser(ParserOptions parserOptions)
public TokenManager createTokenManager(Reader source)
createTokenManager in class AbstractParserprotected JavaParser createJavaParser(Reader source) throws ParseException
ParseExceptionpublic boolean canParse()
Parserpublic Node parse(String fileName, Reader source) throws ParseException
ParserfileName - The file name being parsed (may be null).source - Reader that provides the source code of a compilation unitParseException - In case the source code could not be parsed, probably
due to syntactical errors.ParseExceptionCopyright © 2002-2014 InfoEther. All Rights Reserved.