Class SelectorExpression.TokenData

java.lang.Object
com.iizix.prop.SelectorExpression.TokenData
Enclosing class:
SelectorExpression

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

    Fields
    Modifier and Type
    Field
    Description
    final String
    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.
    final Pattern
    RegExp compiled pattern, null for all tokens except RegExp.
    final int[]
    Positions for token: At least one, [0] is start position.
    final String
    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.
    The token.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the quoted string length, including the quotes: as entered.
    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 Details

    • token

      public final SelectorExpression.Token token
      The token.
    • text

      public final 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 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 Pattern pattern
      RegExp compiled pattern, null for all tokens except RegExp.
  • Method Details

    • getQuotedStringLength

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

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