/** * Create and configure a ServletContainer object to the list of * subresources * * @param key * The key for the ServletContainer resource * @param config * The ServletContainerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T servletContainer(java.lang.String childKey, ServletContainerConsumer consumer) { ServletContainer<? extends ServletContainer> child = new ServletContainer<>( childKey); if (consumer != null) { consumer.accept(child); } servletContainer(child); return (T) this; }
/** * Create and configure a ServletContainer object to the list of * subresources * * @param key * The key for the ServletContainer resource * @param config * The ServletContainerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T servletContainer(java.lang.String childKey, ServletContainerConsumer consumer) { ServletContainer<? extends ServletContainer> child = new ServletContainer<>( childKey); if (consumer != null) { consumer.accept(child); } servletContainer(child); return (T) this; }