// Path: westty-api/src/main/java/org/deephacks/westty/server/ServerName.java
// @Alternative
// public class ServerName {
//     private String name;
// 
//     public ServerName(String name){
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// }


import com.google.common.base.Optional;
import org.deephacks.confit.ConfigContext;
import org.deephacks.confit.model.AbortRuntimeException;
import org.deephacks.confit.model.Events;
import org.deephacks.westty.server.ServerName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
import java.lang.reflect.Constructor;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
package org.deephacks.westty.config;



/**
 * This class enables injection of configurable classes that have an @Id
 * same as the running server instance. This also means that the configurable
 * class must have a constructor that takes its id as an argument.
 *
 * @param <T> configurable class
 */
public class ServerSpecificConfigProxy<T> {
    private T config;

    private ServerSpecificConfigProxy(T config){
        this.config = config;
    }

    /**
     * @return The configurable server specific instance or an empty default
     * instance if it does not exist in the configuration bean manager.
     */
    public T get(){
        return config;
    }

    static class ServerSpecificConfigProxyProducer<T> {
        private static final Logger log = LoggerFactory.getLogger(ServerSpecificConfigProxyProducer.class);
        @Inject
// Path: westty-api/src/main/java/org/deephacks/westty/server/ServerName.java
// @Alternative
// public class ServerName {
//     private String name;
// 
//     public ServerName(String name){
//         this.name = name;
//     }
// 
//     public String getName() {
//         return name;
//     }
// }


// Path: westty-api/src/main/java/org/deephacks/westty/config/ServerSpecificConfigProxy.java
import com.google.common.base.Optional;
import org.deephacks.confit.ConfigContext;
import org.deephacks.confit.model.AbortRuntimeException;
import org.deephacks.confit.model.Events;
import org.deephacks.westty.server.ServerName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
import java.lang.reflect.Constructor;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;

package org.deephacks.westty.config;



/**
 * This class enables injection of configurable classes that have an @Id
 * same as the running server instance. This also means that the configurable
 * class must have a constructor that takes its id as an argument.
 *
 * @param <T> configurable class
 */
public class ServerSpecificConfigProxy<T> {
    private T config;

    private ServerSpecificConfigProxy(T config){
        this.config = config;
    }

    /**
     * @return The configurable server specific instance or an empty default
     * instance if it does not exist in the configuration bean manager.
     */
    public T get(){
        return config;
    }

    static class ServerSpecificConfigProxyProducer<T> {
        private static final Logger log = LoggerFactory.getLogger(ServerSpecificConfigProxyProducer.class);
        @Inject
        private ServerName serverName;