All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gwtplatform.dispatch.rest.rebind.gin.GinModule.vm Maven / Gradle / Ivy

There is a newer version: 1.6
Show newest version
package $package;

import javax.inject.Singleton;

import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.TypeLiteral;
#foreach ($binding in $bindings)
import $binding.definition.getQualifiedName();
import $binding.implementation.getQualifiedName();
#end

public class $impl extends AbstractGinModule {
    @Override
    protected void configure() {
#foreach ($binding in $bindings)
#if($binding.definition.isParameterized())
        bind(new TypeLiteral<$binding.definition.getParameterizedClassName()>() {})
#else
        bind(${binding.definition.className}.class)
#end
#if($binding.implementation.isParameterized())
                .to(new TypeLiteral<$binding.implementation.getParameterizedClassName()>() {})
#else
                .to(${binding.implementation.className}.class)
#end
#if($binding.isSingleton())
                .in(Singleton.class)#end;
#end
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy