| |
|
| java.lang.Object org.jpox.store.query.Parser
All known Subclasses: org.jpox.store.query.JPQLParser,
Parser | public class Parser (Code) | | Parser for a Query. The query can be JDOQL, or JPQL.
Allows a class to work its way through the parsed string, obtaining relevant
components with each call, or peeking ahead before deciding what component
to parse next.
version: $Revision: 1.18 $ |
LOCALISER | final protected static Localiser LOCALISER(Code) | | Localiser for messages.
|
Parser | public Parser(String input, Imports imports)(Code) | | Constructor
Parameters: input - The input string Parameters: imports - Necessary imports to use in the parse. |
getIndex | public int getIndex()(Code) | | Accessor for the current index in the input string.
The current index. |
getInput | public String getInput()(Code) | | Accessor for the input string.
The input string. |
nextIsDot | public boolean nextIsDot()(Code) | | Utility to return if the next character is a dot.
Whether it is a dot at the current point |
nextIsSingleQuote | public boolean nextIsSingleQuote()(Code) | | Utility to return if the next non-whitespace character is a single quote.
Whether it is a single quote at the current point (ignoring whitespace) |
parseBooleanLiteral | public Boolean parseBooleanLiteral()(Code) | | Parse a boolean from the current position.
The boolean parsed (null if not valid). |
parseCast | public Class parseCast(ClassLoaderResolver clr, ClassLoader primary)(Code) | | Parse a cast in the query from the current position, returning
the class that is being cast to. Returns null if the current position
doesnt have a cast.
Parameters: clr - The ClassLoaderResolver Parameters: primary - The primary class loader to use (if any) The class to cast to |
parseChar | public boolean parseChar(char c)(Code) | | Check if char c is found
Parameters: c - the Character to find true if c is found |
parseChar | public boolean parseChar(char c, char unlessFollowedBy)(Code) | | Check if char c is found
Parameters: c - the Character to find Parameters: unlessFollowedBy - the character to validate it does not follow c true if c is found and not followed by unlessFollowedBy |
parseCharacterLiteral | public Character parseCharacterLiteral()(Code) | | Parse a Character literal.
the Character parsed. null if single quotes is found throws: JPOXUserException - if an invalid character is found or the CharacterIterator is finished |
parseEOS | public boolean parseEOS()(Code) | | Check if END OF TEXT is reach
true if END OF TEXT is reach |
parseEscapedCharacter | protected char parseEscapedCharacter()(Code) | | Parse a escaped character.
the escaped char throws: JPOXUserException - if a escaped character is not valid |
parseFloatingPointLiteral | public BigDecimal parseFloatingPointLiteral()(Code) | | Parse a floating point number from the current position.
The floating point number parsed (null if not valid). |
parseIdentifier | public String parseIdentifier()(Code) | | Parse a java identifier from the current position.
The identifier |
parseIntegerLiteral | public BigInteger parseIntegerLiteral()(Code) | | Parse an integer number from the current position.
The integer number parsed (null if not valid). |
parseMethod | public String parseMethod()(Code) | | Checks if a java Method is found
true if a Method is found |
parseName | public String parseName()(Code) | | Parses the text string (up to the next space) and
returns it. The name includes '.' characters.
This can be used, for example, when parsing a class name wanting to
read in the full name (including package) so that it can then be
checked for existence in the CLASSPATH.
The name |
parseNullLiteral | public boolean parseNullLiteral()(Code) | | Checks if null literal is parsed
true if null literal is found |
parseString | public boolean parseString(String s)(Code) | | Check if String s is found
Parameters: s - the String to find true if s is found |
parseStringIgnoreCase | public boolean parseStringIgnoreCase(String s)(Code) | | Check if String s is found ignoring the case
Parameters: s - the String to find true if s is found |
parseStringLiteral | public String parseStringLiteral()(Code) | | Parse a String literal.
the String parsed. null if single quotes or double quotes is found throws: JPOXUserException - if an invalid character is found or the CharacterIterator is finished |
peekStringIgnoreCase | public boolean peekStringIgnoreCase(String s)(Code) | | Check if String "s" is found ignoring the case, and not moving the cursor position.
Parameters: s - the String to find true if string is found |
skipWS | public int skipWS()(Code) | | Skip over any whitespace from the current position.
The new position |
|
|
|