code: @Override
      public Token getNextToken(final String logFormat, final int startOffset) {
          final Matcher matcher = pattern.matcher(logFormat.substring(startOffset));
          if (!matcher.find()) {
              return null;
          }
  
          String fieldName = "";
          if (matcher.groupCount() > 0) {
              // Retrieve the name
              fieldName = matcher.group(1);
          }
  
          // Retrieve indices of matching string
          final int start = matcher.start();
          final int end = matcher.end();
          // the end is index of the last matching character + 1
  
  
          Token token = new Token(
              getRegex(),
              startOffset + start, end - start,
              getPrio());
  
          for (TokenOutputField tokenOutputField: getOutputFields()) {
              String fieldType = tokenParameterToTypeName(fieldName);
              token.addOutputField(
                  tokenParameterToTypeName(fieldName),
                  tokenOutputField.getName(),
                  tokenOutputField.getCasts());
              addCustomDissector(token, fieldType, fieldName);
          }
  
          if (warningMessageWhenUsed != null) {
              token.setWarningMessageWhenUsed(warningMessageWhenUsed.replaceFirst("\\{}", fieldName));
          }
  
          return token;
      }
docs: --------------------------------------------