Class NameAbbreviator.PatternAbbreviatorFragment

java.lang.Object
org.apache.logging.log4j.core.pattern.NameAbbreviator.PatternAbbreviatorFragment
Enclosing class:
NameAbbreviator

private static final class NameAbbreviator.PatternAbbreviatorFragment extends Object
Fragment of an pattern abbreviator.
  • Field Details

    • EMPTY_ARRAY

      static final NameAbbreviator.PatternAbbreviatorFragment[] EMPTY_ARRAY
    • charCount

      private final int charCount
      Count of initial characters of element to output.
    • ellipsis

      private final char ellipsis
      Character used to represent dropped characters. '\0' indicates no representation of dropped characters.
  • Constructor Details

    • PatternAbbreviatorFragment

      PatternAbbreviatorFragment(int charCount, char ellipsis)
      Creates a PatternAbbreviatorFragment.
      Parameters:
      charCount - number of initial characters to preserve.
      ellipsis - character to represent elimination of characters, '\0' if no ellipsis is desired.
  • Method Details

    • abbreviate

      int abbreviate(String input, int inputIndex, StringBuilder buf)
      Abbreviate element of name.
      Parameters:
      input - input string which is being written to the output buf.
      inputIndex - starting index of name element in the input string.
      buf - buffer to receive element.
      Returns:
      starting index of next element.
    • toString

      public String toString()
      Overrides:
      toString in class Object