Class SelectorExpression.TokenData

  • Enclosing class:
    SelectorExpression

    public static class SelectorExpression.TokenData
    extends java.lang.Object
    Tokens data class with token information, and positions (offsets) in the expression String.
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      java.lang.Stringmatch
      The first text, null when not used, otherwise: SELECTOR: the selector name, JAVA_CLASS: the class name, and WILD_CARD and REG_EXP: the environment variable.
      java.util.regex.Patternpattern
      RegExp compiled pattern, null for all tokens except RegExp.
      int[]pos
      Positions for token: At least one, [0] is start position.
      java.lang.Stringtext
      The first text, null when not used, otherwise: SELECTOR: the selector name, JAVA_CLASS: the class name, and WILD_CARD and REG_EXP: the environment variable.
      SelectorExpression.Tokentoken
      The token.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      intgetQuotedStringLength()
      Gets the quoted string length, including the quotes: as entered.
      java.lang.StringgetString()
      Formats the token to a string for an expression output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • text

        public final java.lang.String text
        The first text, null when not used, otherwise:
        • SELECTOR: the selector name,
        • JAVA_CLASS: the class name, and
        • WILD_CARD and REG_EXP: the environment variable.
      • match

        public final java.lang.String match
        The first text, null when not used, otherwise:
        • SELECTOR: the selector name,
        • JAVA_CLASS: the class name, and
        • WILD_CARD and REG_EXP: the environment variable.
      • pos

        public final int[] pos
        Positions for token: At least one, [0] is start position.
        • NOT: The locations of all '!' characters (if many are present).
        • SELECTOR:
          [0] position for '{',
          [1] position for "sel",
          [2] position for ':',
          [3] the selector name,
          [4] position for '}'.
        • JAVA_CLASS:
          [0] position for '{',
          [1] position for "java",
          [2] position for ':',
          [3] the class name,
          [4] position for '}'.
        • WILD_CARD and REG_EXP:
          [0] position for '{',
          [1] position for keyword,
          [2] position for ':',
          [3] the environment variable name,
          [4] position for ':',
          [5] position for quote,
          [6] position for '}'.
      • pattern

        public final java.util.regex.Pattern pattern
        RegExp compiled pattern, null for all tokens except RegExp.
    • Method Detail

      • getQuotedStringLength

        public int getQuotedStringLength()
        Gets the quoted string length, including the quotes: as entered.
      • getString

        public java.lang.String getString()
        Formats the token to a string for an expression output.
        Returns:
        The string for the token.