Examples of asEagerSingleton()


Examples of com.google.inject.binder.ScopedBindingBuilder.asEagerSingleton()

    checkModule(
        new AbstractModule() {
          protected void configure() {
            ScopedBindingBuilder sbb = bind(List.class).to(ArrayList.class);
            sbb.in(Scopes.NO_SCOPE);
            sbb.asEagerSingleton();
          }
        },

        new FailingElementVisitor() {
          @Override public <T> Void visit(Binding<T> command) {
View Full Code Here

Examples of com.google.inject.binder.ScopedBindingBuilder.asEagerSingleton()

            final Key key = getBindingKey( args[0], bindingName );
            final ScopedBindingBuilder sbb = binder.bind( key ).toProvider( providerType );
            if ( isEagerSingleton( providerType ) )
            {
                sbb.asEagerSingleton();
            }
            else if ( isSingleton( providerType ) )
            {
                sbb.in( Scopes.SINGLETON );
            }
View Full Code Here

Examples of com.google.inject.binder.ScopedBindingBuilder.asEagerSingleton()

    private void bindQualifiedType( final Class<?> qualifiedType )
    {
        final ScopedBindingBuilder sbb = binder.bind( qualifiedType );
        if ( isEagerSingleton( qualifiedType ) )
        {
            sbb.asEagerSingleton();
        }

        final Named bindingName = getBindingName( qualifiedType );
        final Class<?>[] types = getBindingTypes( qualifiedType );
View Full Code Here
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.