The abstract definition of a validator, which provides helper methods and visitors.

Provisional API: This interface is part of an interim API that is still under development and
expected to change significantly before reaching stability. It is available at this early stage
to solicit feedback from pioneering adopters on the understanding that any code that uses this
API will almost certainly be broken (repeatedly) as the API evolves.

addProblem

Adds a new validation problem that was found in the given Expression. The start index
is the position of the given Expression within the JPQL query and the end index is
the end position of the Expression within the JPQL query.

Parameters:

expression - The Expression that is either not following the BNF grammar or that
has semantic problems

messageKey - The key used to retrieve the localized message describing the problem

addProblem

Adds a new validation problem that was found in the given Expression. The start index
is the position of the given Expression within the JPQL query and the end index is
the end position of the Expression within the JPQL query.

Parameters:

expression - The Expression that is either not following the BNF grammar or that
has semantic problems

messageKey - The key used to retrieve the localized message describing the problem

arguments - The list of arguments that can be used to format the localized description of
the problem

literal

Retrieves the "literal" from the given Expression. The literal to retrieve depends on
the given type. The literal is basically a string value like an
identification variable name, an input parameter, a path expression, an abstract schema name,
etc.