Class PluginParser.Parser

java.lang.Object
org.datanucleus.plugin.PluginParser.Parser
Enclosing class:
PluginParser

public static class PluginParser.Parser extends Object
Parser for a list of Bundle-Description
  • Field Details

  • Constructor Details

    • Parser

      public Parser(String input)
      Constructor
      Parameters:
      input - The input string
  • Method Details

    • getInput

      public String getInput()
      Accessor for the input string.
      Returns:
      The input string.
    • 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 char c is found
      Parameters:
      c - the Character to find
      Returns:
      true if c is found
    • parseChar

      public boolean parseChar(char c, char unlessFollowedBy)
      Check if char c is found
      Parameters:
      c - the Character to find
      unlessFollowedBy - the character to validate it does not follow c
      Returns:
      true if c is found and not followed by unlessFollowedBy
    • parseIntegerLiteral

      public BigInteger parseIntegerLiteral()
      Parse an integer number from the current position.
      Returns:
      The integer number parsed (null if not valid).
    • parseString

      public boolean parseString(String s)
      Check if String s is found
      Parameters:
      s - the String to find
      Returns:
      true if s is found
    • parseStringIgnoreCase

      public boolean parseStringIgnoreCase(String s)
      Check if String s is found ignoring the case
      Parameters:
      s - the String to find
      Returns:
      true if s is found
    • parseIdentifier

      public String parseIdentifier()
      Parse a java identifier from the current position.
      Returns:
      The identifier
    • parseInterval

      public String parseInterval()
      Parse an OSGi interval from the current position.
      Returns:
      The interval
    • parseName

      public String 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

      public String 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

      public String remaining()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • parseParameters

      public Map parseParameters()
    • parseSymbolicName

      public String parseSymbolicName()