// Path: dagger-jersey/src/main/java/com/leacox/dagger/jersey/JerseyModule.java
// @Module(
//         injects = {
//                 DaggerContainer.class
//         },
//         includes = {
//                 ServletModule.class
//         },
//         library = true
// )
// public class JerseyModule {
//     @Provides
//     @Singleton
//     public DaggerContainer provideDaggerContainer(ObjectGraph objectGraph, @ModuleClasses Object[] modules) {
//         return new DaggerContainer(objectGraph, modules);
//     }
// 
//     @Provides
//     public WebApplication webApplication(DaggerContainer daggerContainer) {
//         return daggerContainer.getWebApplication();
//     }
// 
//     @Provides
//     public Providers provideProviders(WebApplication webApplication) {
//         return webApplication.getProviders();
//     }
// 
//     @Provides
//     public FeaturesAndProperties provideFeaturesAndProperties(WebApplication webApplication) {
//         return webApplication.getFeaturesAndProperties();
//     }
// 
//     @Provides
//     public MessageBodyWorkers provideMessageBodyWorkers(WebApplication webApplication) {
//         return webApplication.getMessageBodyWorkers();
//     }
// 
//     @Provides
//     public ExceptionMapperContext provideExceptionMapperContext(WebApplication webApplication) {
//         return webApplication.getExceptionMapperContext();
//     }
// 
//     @Provides
//     public ResourceContext provideResourceContext(WebApplication webApplication) {
//         return webApplication.getResourceContext();
//     }
// }
// 
// Path: dagger-servlet/src/main/java/com/leacox/dagger/servlet/ServletModule.java
// @Module(
//         injects = {
//                 ServletContext.class
//         },
//         includes = {
//                 InternalServletModule.class
//         }
// )
// public class ServletModule {
//     @Provides
//     @Singleton
//     ServletContext provideServletContext(ServletContextProvider servletContextProvider) {
//         return servletContextProvider.get();
//     }
// }


import com.leacox.dagger.jersey.JerseyModule;
import com.leacox.dagger.servlet.ServletModule;
import dagger.Module;
import dagger.Provides;
import javax.inject.Singleton;
/**
 * Copyright (C) 2014 John Leacox
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.leacox.dagger.example.simple;



/**
 * @author John Leacox
 */
@Module(
        injects = {
                SimpleService.class,
                SimpleResource.class
        },
        includes = {
                ServletModule.class,
// Path: dagger-jersey/src/main/java/com/leacox/dagger/jersey/JerseyModule.java
// @Module(
//         injects = {
//                 DaggerContainer.class
//         },
//         includes = {
//                 ServletModule.class
//         },
//         library = true
// )
// public class JerseyModule {
//     @Provides
//     @Singleton
//     public DaggerContainer provideDaggerContainer(ObjectGraph objectGraph, @ModuleClasses Object[] modules) {
//         return new DaggerContainer(objectGraph, modules);
//     }
// 
//     @Provides
//     public WebApplication webApplication(DaggerContainer daggerContainer) {
//         return daggerContainer.getWebApplication();
//     }
// 
//     @Provides
//     public Providers provideProviders(WebApplication webApplication) {
//         return webApplication.getProviders();
//     }
// 
//     @Provides
//     public FeaturesAndProperties provideFeaturesAndProperties(WebApplication webApplication) {
//         return webApplication.getFeaturesAndProperties();
//     }
// 
//     @Provides
//     public MessageBodyWorkers provideMessageBodyWorkers(WebApplication webApplication) {
//         return webApplication.getMessageBodyWorkers();
//     }
// 
//     @Provides
//     public ExceptionMapperContext provideExceptionMapperContext(WebApplication webApplication) {
//         return webApplication.getExceptionMapperContext();
//     }
// 
//     @Provides
//     public ResourceContext provideResourceContext(WebApplication webApplication) {
//         return webApplication.getResourceContext();
//     }
// }
// 
// Path: dagger-servlet/src/main/java/com/leacox/dagger/servlet/ServletModule.java
// @Module(
//         injects = {
//                 ServletContext.class
//         },
//         includes = {
//                 InternalServletModule.class
//         }
// )
// public class ServletModule {
//     @Provides
//     @Singleton
//     ServletContext provideServletContext(ServletContextProvider servletContextProvider) {
//         return servletContextProvider.get();
//     }
// }


// Path: examples/jersey-simple/src/main/java/com/leacox/dagger/example/simple/SimpleModule.java
import com.leacox.dagger.jersey.JerseyModule;
import com.leacox.dagger.servlet.ServletModule;
import dagger.Module;
import dagger.Provides;
import javax.inject.Singleton;

/**
 * Copyright (C) 2014 John Leacox
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.leacox.dagger.example.simple;



/**
 * @author John Leacox
 */
@Module(
        injects = {
                SimpleService.class,
                SimpleResource.class
        },
        includes = {
                ServletModule.class,
                JerseyModule.class