class ServletTransactionHelper {

    public static void setTransactionNameByServletClass(@Nullable String method, @Nullable Class<?> servletClass, Transaction transaction) {
        if (servletClass == null) {
            return;
        }
        StringBuilder transactionName = transaction.getAndOverrideName(PRIO_LOW_LEVEL_FRAMEWORK);
        if (transactionName == null) {
            return;
        }
        String servletClassName = servletClass.getName();
        transactionName.append(servletClassName, servletClassName.lastIndexOf('.') + 1, servletClassName.length());
        if (method != null) {
            transactionName.append('#');
            switch (method) {
                case "DELETE":
                    transactionName.append("doDelete");
                    break;
                case "HEAD":
                    transactionName.append("doHead");
                    break;
                case "GET":
                    transactionName.append("doGet");
                    break;
                case "OPTIONS":
                    transactionName.append("doOptions");
                    break;
                case "POST":
                    transactionName.append("doPost");
                    break;
                case "PUT":
                    transactionName.append("doPut");
                    break;
                case "TRACE":
                    transactionName.append("doTrace");
                    break;
                default:
                    transactionName.append(method);
            }
        }
    }

    public  ServletTransactionHelper(ElasticApmTracer tracer);

}