@Test public void basicInstantiation() { final MockRealm mockRealm = createMock(MockRealm.class); Injector injector = Guice.createInjector(new ShiroModule() { @Override protected void configureShiro() { bindRealm().to(MockRealm.class); } @Provides public MockRealm createRealm() { return mockRealm; } }); SecurityManager securityManager = injector.getInstance(SecurityManager.class); assertNotNull(securityManager); }
protected final LinkedBindingBuilder<Realm> bindRealm() { Multibinder<Realm> multibinder = Multibinder.newSetBinder(binder(), Realm.class); return multibinder.addBinding(); }
ShiroModule extends PrivateModule implements Destroyable { protected final LinkedBindingBuilder<Realm> bindRealm() { Multibinder<Realm> multibinder = Multibinder.newSetBinder(binder(), Realm.class); return multibinder.addBinding(); } }
ShiroModule extends PrivateModule implements Destroyable { protected final LinkedBindingBuilder<Realm> bindRealm() { Multibinder<Realm> multibinder = Multibinder.newSetBinder(binder(), Realm.class); return multibinder.addBinding(); }  }
ShiroModule extends PrivateModule implements Destroyable { protected final LinkedBindingBuilder<Realm> bindRealm() { Multibinder<Realm> multibinder = Multibinder.newSetBinder(binder(), Realm.class); return multibinder.addBinding(); }  void configure(); final void destroy(); void add(Destroyable destroyable); }
ShiroModule extends PrivateModule implements Destroyable { protected final LinkedBindingBuilder<Realm> bindRealm() { Multibinder<Realm> multibinder = Multibinder.newSetBinder(binder(), Realm.class); return multibinder.addBinding(); }  void configure(); final void destroy(); void add(Destroyable destroyable);  }