Skip to content

Commit

Permalink
cleaning up docs example classes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed May 25, 2024
1 parent 0973048 commit 9df2e7f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.jetty.JettyModule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.jetty.JettyModule;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.jetty.JettyModule;
import jakarta.servlet.http.HttpSessionEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.jetty.JettyModule;
import io.bootique.jetty.MappedServlet;
Expand All @@ -31,7 +31,7 @@ public class ModuleWithMappedServlet implements BQModule {
// tag::bindMappedServlet[]
@Override
public void configure(Binder binder) {
MappedServlet mappedServlet = new MappedServlet(
MappedServlet<MyServlet> mappedServlet = new MappedServlet<>(
new MyServlet(),
Collections.singleton("/c"),
"myservlet");
Expand All @@ -40,6 +40,6 @@ public void configure(Binder binder) {
}
// end::bindMappedServlet[]

public class MyServlet extends HttpServlet {
static class MyServlet extends HttpServlet {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.di.Provides;
import io.bootique.di.TypeLiteral;
Expand All @@ -36,7 +36,7 @@ public class ModuleWithMappedServletAndDI implements BQModule {
public void configure(Binder binder) {

// must use TypeLiteral to identify which kind of MappedServlet<..> to add
TypeLiteral<MappedServlet<MyServlet>> tl = new TypeLiteral<MappedServlet<MyServlet>>() {
TypeLiteral<MappedServlet<MyServlet>> tl = new TypeLiteral<>() {
};
JettyModule.extend(binder).addMappedServlet(tl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.jetty.websocket.JettyWebSocketModule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.jetty.JettyModule;
import io.bootique.jetty.MappedServlet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package io.bootique.jetty.docs;

import io.bootique.di.BQModule;
import io.bootique.BQModule;
import io.bootique.di.Binder;
import io.bootique.jetty.JettyModule;
import io.bootique.jetty.MappedServlet;
Expand Down

0 comments on commit 9df2e7f

Please sign in to comment.