public static String getServletName(final WebServlet servlet, final Class<? extends HttpServlet> type) {
        final String name = Strings.emptyToNull(servlet.name());
        return name != null ? name : generateName(type, "servlet");
    }
public static String getServletName ( final WebServlet servlet , final Class < ? extends HttpServlet > type ) { final String name = Strings . emptyToNull ( servlet . name ( ) ) ; return name != null ? name : generateName ( type , "servlet" ) ; }
@param servlet servlet annotation
@param type    servlet type
@return servlet name or generated name if name not provided