Package com.epsilon5.client.modules

Source Code of com.epsilon5.client.modules.AppModule

package com.epsilon5.client.modules;

import com.google.inject.Binder;
import com.google.inject.Module;
import com.google.inject.TypeLiteral;
import com.google.inject.matcher.Matchers;
import com.google.inject.spi.TypeEncounter;
import com.google.inject.spi.TypeListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AppModule implements Module {

    private final Logger logger = LoggerFactory.getLogger(AppModule.class);

    @Override
    public void configure(Binder binder) {
        binder.bindListener(Matchers.any(), new TypeListener() {
            @Override
            public <I> void hear(TypeLiteral<I> type, TypeEncounter<I> encounter) {
                logger.debug("{} is created", type.getRawType().getName());
            }
        });

        binder.install(new DescriptionModule());
    }

}
TOP

Related Classes of com.epsilon5.client.modules.AppModule

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.