throw UndertowServletMessages.MESSAGES.servletMustImplementServlet(name, servletClass);
}
try {
final Constructor<? extends Servlet> ctor = servletClass.getDeclaredConstructor();
ctor.setAccessible(true);
this.instanceFactory = new ConstructorInstanceFactory(ctor);
this.name = name;
this.servletClass = servletClass;
} catch (NoSuchMethodException e) {
throw UndertowServletMessages.MESSAGES.componentMustHaveDefaultConstructor("Servlet", servletClass);
}