docs: public LineType getLineType(final Configuration configuration)
      {
          if (this.isEmpty)
          {
              return LineType.EMPTY;
          }
  
          if (this.leading > 3)
          {
              return LineType.CODE;
          }
  
          if (this.value.charAt(this.leading) == '#')
          {
              return LineType.HEADLINE;
          }
  
          if (this.value.charAt(this.leading) == '>')
          {
              return LineType.BQUOTE;
          }
  
          if (configuration.forceExtendedProfile)
          {
              if (this.value.length() - this.leading - this.trailing > 2)
              {
                  if (this.value.charAt(this.leading) == '`'
                          && this.countCharsStart('`', configuration.allowSpacesInFencedDelimiters) >= 3)
                  {
                      return LineType.FENCED_CODE;
                  }
                  if (this.value.charAt(this.leading) == '~'
                          && this.countCharsStart('~', configuration.allowSpacesInFencedDelimiters) >= 3)
                  {
                      return LineType.FENCED_CODE;
                  }
              }
          }
  
          if (this.value.length() - this.leading - this.trailing > 2
                  && (this.value.charAt(this.leading) == '*' || this.value.charAt(this.leading) == '-' || this.value
                          .charAt(this.leading) == '_'))
          {
              if (this.countChars(this.value.charAt(this.leading)) >= 3)
              {
                  return LineType.HR;
              }
          }
  
          if (this.value.length() - this.leading >= 2 && this.value.charAt(this.leading + 1) == ' ')
          {
              switch (this.value.charAt(this.leading))
              {
              case '*':
              case '-':
              case '+':
                  return LineType.ULIST;
              }
          }
  
          if (this.value.length() - this.leading >= 3 && Character.isDigit(this.value.charAt(this.leading)))
          {
              int i = this.leading + 1;
              while (i < this.value.length() && Character.isDigit(this.value.charAt(i)))
              {
                  i++;
              }
              if (i + 1 < this.value.length() && this.value.charAt(i) == '.' && this.value.charAt(i + 1) == ' ')
              {
                  return LineType.OLIST;
              }
          }
  
          if (this.value.charAt(this.leading) == '<')
          {
              if (this.checkHTML())
              {
                  return LineType.XML;
              }
          }
  
          if (this.next != null && !this.next.isEmpty)
          {
              if ((this.next.value.charAt(0) == '-') && (this.next.countChars('-') > 0))
              {
                  return LineType.HEADLINE2;
              }
              if ((this.next.value.charAt(0) == '=') && (this.next.countChars('=') > 0))
              {
                  return LineType.HEADLINE1;
              }
          }
  
          return LineType.OTHER;
      }