Class StringPart

java.lang.Object
org.jboss.logging.processor.validation.AbstractFormatPart
org.jboss.logging.processor.validation.StringPart
All Implemented Interfaces:
Comparable<FormatPart>, FormatPart

class StringPart extends AbstractFormatPart
Represents the string portions of a format string.

Date: 13.06.2011

  • Field Details

    • position

      private final int position
    • part

      private final String part
  • Constructor Details

    • StringPart

      public StringPart(int position, String part)
      Creates a new string part.
      Parameters:
      position - the position.
      part - the string.
  • Method Details

    • of

      public static StringPart of(int position, String part)
      Creates a new string part.
      Parameters:
      position - the position.
      part - the string.
      Returns:
      the string part.
    • index

      public int index()
      Description copied from interface: FormatPart
      The parameter index. For default strings (non-parameters) the value is -2.
      Returns:
      the index.
    • position

      public int position()
      Description copied from interface: FormatPart
      The position for the part.
      Returns:
      the position.
    • part

      public String part()
      Description copied from interface: FormatPart
      The part of the format.
      Returns:
      the part of the format.