Class PluginParser.Parser
java.lang.Object
org.datanucleus.plugin.PluginParser.Parser
- Enclosing class:
PluginParser
Parser for a list of Bundle-Description
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()Accessor for the current index in the input string.getInput()Accessor for the input string.private final booleanisDecDigit(char c) Utility to return if a character is a decimal digit.private final booleanisHexDigit(char c) Utility to return if a character is a hexadecimal digit.private final booleanisOctDigit(char c) Utility to return if a character is a octal digit.booleanUtility to return if the next character is a comma.booleanUtility to return if the next character is a dot.booleanUtility to return if the next character is a semi-colon.booleanUtility to return if the next non-whitespace character is a single quote.booleanparseChar(char c) Check if charcis foundbooleanparseChar(char c, char unlessFollowedBy) Check if charcis foundbooleanparseEOS()Check if END OF TEXT is reachprivate charParse a escaped characterParse a java identifier from the current position.Parse an integer number from the current position.Parse an OSGi interval from the current position.Parses the text string (up to the next space) and returns it.booleanCheck if Stringsis foundbooleanCheck if Stringsis found ignoring the caseParse a String literalintskipWS()Skip over any whitespace from the current position.toString()
-
Field Details
-
input
-
ci
-
-
Constructor Details
-
Parser
-
-
Method Details
-
getInput
-
getIndex
public int getIndex()Accessor for the current index in the input string.- Returns:
- The current index.
-
skipWS
public int skipWS()Skip over any whitespace from the current position.- Returns:
- The new position
-
parseEOS
public boolean parseEOS()Check if END OF TEXT is reach- Returns:
- true if END OF TEXT is reach
-
parseChar
public boolean parseChar(char c) Check if charcis found- Parameters:
c- the Character to find- Returns:
- true if
cis found
-
parseChar
public boolean parseChar(char c, char unlessFollowedBy) Check if charcis found- Parameters:
c- the Character to findunlessFollowedBy- the character to validate it does not followc- Returns:
- true if
cis found and not followed byunlessFollowedBy
-
parseIntegerLiteral
Parse an integer number from the current position.- Returns:
- The integer number parsed (null if not valid).
-
parseString
Check if Stringsis found- Parameters:
s- the String to find- Returns:
- true if
sis found
-
parseStringIgnoreCase
Check if Stringsis found ignoring the case- Parameters:
s- the String to find- Returns:
- true if
sis found
-
parseIdentifier
Parse a java identifier from the current position.- Returns:
- The identifier
-
parseInterval
Parse an OSGi interval from the current position.- Returns:
- The interval
-
parseName
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.- Returns:
- The name
-
isDecDigit
private final boolean isDecDigit(char c) Utility to return if a character is a decimal digit.- Parameters:
c- The character- Returns:
- Whether it is a decimal digit
-
isOctDigit
private final boolean isOctDigit(char c) Utility to return if a character is a octal digit.- Parameters:
c- The character- Returns:
- Whether it is a octal digit
-
isHexDigit
private final boolean isHexDigit(char c) Utility to return if a character is a hexadecimal digit.- Parameters:
c- The character- Returns:
- Whether it is a hexadecimal digit
-
nextIsSingleQuote
public boolean nextIsSingleQuote()Utility to return if the next non-whitespace character is a single quote.- Returns:
- Whether it is a single quote at the current point (ignoring whitespace)
-
nextIsDot
public boolean nextIsDot()Utility to return if the next character is a dot.- Returns:
- Whether it is a dot at the current point
-
nextIsComma
public boolean nextIsComma()Utility to return if the next character is a comma.- Returns:
- Whether it is a dot at the current point
-
nextIsSemiColon
public boolean nextIsSemiColon()Utility to return if the next character is a semi-colon.- Returns:
- Whether it is a semi-colon at the current point
-
parseStringLiteral
Parse a String literal- Returns:
- the String parsed. null if single quotes or double quotes is found
- Throws:
NucleusUserException- if an invalid character is found or the CharacterIterator is finished
-
parseEscapedCharacter
private char parseEscapedCharacter()Parse a escaped character- Returns:
- the escaped char
- Throws:
NucleusUserException- if a escaped character is not valid
-
remaining
-
toString
-
parseParameters
-
parseSymbolicName
-