public abstract class JPQLParser
extends org.antlr.runtime.Parser
Constructor and Description |
---|
JPQLParser(org.antlr.runtime.TokenStream input,
org.antlr.runtime.RecognizerSharedState state) |
Modifier and Type | Method and Description |
---|---|
void |
addError(java.lang.Exception e)
INTERNAL
Add the exception to the list of errors.
|
static java.lang.String |
ANTLRVersion()
INTERNAL
Returns the ANTLR version currently used.
|
static JPQLParser |
buildParserFor(java.lang.String queryText)
INTERNAL
Creates a parser for the specified query string.
|
static JPQLParser |
buildParserFor(java.lang.String queryName,
java.lang.String queryText)
INTERNAL
Creates a parser for the specified query string.
|
static JPQLParseTree |
buildParseTree(java.lang.String queryText)
INTERNAL
Builds a parser, parses the specified query string and returns the
parse tree.
|
static JPQLParseTree |
buildParseTree(java.lang.String queryName,
java.lang.String queryText)
INTERNAL
Builds a parser, parses the specified query string and returns the
parse tree.
|
abstract void |
document()
This is the parser start method.
|
java.util.List |
getErrors()
INTERNAL
Returns the list of errors found during the parsing process.
|
NodeFactory |
getNodeFactory()
INTERNAL
Returns the factory used by the parser to create a parse tree and parse
tree nodes.
|
JPQLParseTree |
getParseTree()
INTERNAL
Returns the parse tree created by a successful run of the parse
method.
|
java.lang.String |
getQueryInfo()
INTERNAL
Return the the query text prefixed by the query name in case of a
named query.
|
java.lang.String |
getQueryName()
INTERNAL
Return the name of the current query being compiled.
|
java.lang.String |
getQueryText()
INTERNAL
Return the text of the current query being compiled.
|
abstract java.lang.Object |
getRootNode()
Returns the root node after representing the parse tree for the current
query string.
|
boolean |
hasErrors()
INTERNAL
Returns true if there were errors during the parsing process.
|
JPQLParseTree |
parse()
INTERNAL
Parse the query string that was specified on parser creation.
|
void |
reportError(org.antlr.runtime.RecognitionException ex)
Method called by the ANTLR generated code in case of an error.
|
void |
setNodeFactory(NodeFactory factory)
INTERNAL
Set the factory used by the parser to create a parse tree and parse
tree nodes.
|
void |
setQueryName(java.lang.String queryName)
INTERNAL
Set the name of the current query being compiled.
|
void |
setQueryText(java.lang.String queryText)
INTERNAL
Set the text of the current query being compiled.
|
getSourceName, getTokenStream, reset, setTokenStream, traceIn, traceOut
alreadyParsedRule, beginResync, consumeUntil, consumeUntil, displayRecognitionError, emitErrorMessage, endResync, failed, getBacktrackingLevel, getErrorHeader, getErrorMessage, getGrammarFileName, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, matchAny, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, recover, recoverFromMismatchedSet, setBacktrackingLevel, toStrings, traceIn, traceOut
public JPQLParser(org.antlr.runtime.TokenStream input, org.antlr.runtime.RecognizerSharedState state)
public static java.lang.String ANTLRVersion() throws java.lang.Exception
java.lang.Exception
public static JPQLParseTree buildParseTree(java.lang.String queryText) throws JPQLException
JPQLException
public static JPQLParseTree buildParseTree(java.lang.String queryName, java.lang.String queryText) throws JPQLException
JPQLException
public static JPQLParser buildParserFor(java.lang.String queryText) throws JPQLException
JPQLException
public static JPQLParser buildParserFor(java.lang.String queryName, java.lang.String queryText) throws JPQLException
JPQLException
public JPQLParseTree parse() throws JPQLException
JPQLException
public JPQLParseTree getParseTree()
public java.lang.String getQueryText()
public void setQueryText(java.lang.String queryText)
public java.lang.String getQueryName()
null
if the current query is a dynamic query and not a named
query.public void setQueryName(java.lang.String queryName)
public java.lang.String getQueryInfo()
public void setNodeFactory(NodeFactory factory)
public NodeFactory getNodeFactory()
public java.util.List getErrors()
public boolean hasErrors()
public void addError(java.lang.Exception e)
public void reportError(org.antlr.runtime.RecognitionException ex)
reportError
in class org.antlr.runtime.BaseRecognizer
public abstract void document() throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public abstract java.lang.Object getRootNode()
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference