Class MessageFormatValidator

java.lang.Object
org.jboss.logging.processor.validation.AbstractFormatValidator
org.jboss.logging.processor.validation.MessageFormatValidator
All Implemented Interfaces:
FormatValidator

class MessageFormatValidator extends AbstractFormatValidator
Represents a MessageFormat string.

**Note: Currently the format type and format style are not validated

Date: 14.06.2011

  • Field Details

    • PATTERN

      public static final Pattern PATTERN
    • formatParts

      private final Set<FormatPart> formatParts
    • formats

      private final Set<MessageFormatPart> formats
    • argumentCount

      private int argumentCount
    • valid

      private boolean valid
    • format

      private final String format
  • Constructor Details

    • MessageFormatValidator

      private MessageFormatValidator(String format)
  • Method Details

    • of

      public static MessageFormatValidator of(String format)
    • of

      public static MessageFormatValidator of(String format, Object... parameters)
    • of

      public static MessageFormatValidator of(String format, int parameterCount)
    • argumentCount

      public int argumentCount()
      Description copied from interface: FormatValidator
      The number of arguments needed for the format.
      Returns:
      the number of arguments needed.
    • format

      public String format()
      Description copied from interface: FormatValidator
      Returns the format string used for validation.
      Returns:
      the format string.
    • isValid

      public boolean isValid()
      Description copied from interface: FormatValidator
      Returns true of the format is valid, otherwise false.
      Returns:
      true of the format is valid, otherwise false.
    • validate

      private void validate()
    • parameterCheck

      private void parameterCheck(Object... parameters)
    • parameterCheck

      private void parameterCheck(int parameterCount)
    • init

      private void init()
    • toString

      public String toString()
      Overrides:
      toString in class Object