Examples of ofType()


Examples of com.google.inject.Key.ofType()

        }
        ImmutableSet.Builder<Dependency<?>> setBuilder = ImmutableSet.builder();
        for (Dependency<?> dependency : dependencies) {
          Key key = dependency.getKey();
          setBuilder.add(
              Dependency.get(key.ofType(Types.providerOf(key.getTypeLiteral().getType()))));
        }
        return setBuilder.build();
      }

      Key getCollectionKey() {
View Full Code Here

Examples of com.google.inject.Key.ofType()

    assertEquals(setBinding.getDependencies().toString(), 2, setBinding.getDependencies().size());
    Set<Dependency<?>> expected = Sets.newHashSet();
    for (Dependency<?> dep : setBinding.getDependencies()) {
      Key key = dep.getKey();
      Dependency<?> providerDependency =
          Dependency.get(key.ofType(Types.providerOf(key.getTypeLiteral().getType())));
      expected.add(providerDependency);
    }
    assertEquals(expected, providerBinding.getDependencies());
  }
View Full Code Here

Examples of com.google.inject.Key.ofType()

            if ( null != types )
            {
                for ( final Class bindingType : types )
                {
                    binder.bind( key.ofType( bindingType ) ).to( key );
                }
            }
        }
    }
View Full Code Here

Examples of com.google.inject.Key.ofType()

        if ( null != types )
        {
            final Key key = getBindingKey( OBJECT_TYPE_LITERAL, bindingName );
            for ( final Class bindingType : types )
            {
                binder.bind( key.ofType( bindingType ) ).to( qualifiedType );
            }
        }
        else
        {
            binder.bind( new WildcardKey( qualifiedType, bindingName ) ).to( qualifiedType );
View Full Code Here

Examples of org.apache.commons.digester3.binder.FactoryCreateBuilder.ofType()

            .overriddenByAttribute( annotation.attributeName().length() > 0 ? annotation.attributeName() : null )
            .ignoreCreateExceptions( annotation.ignoreCreateExceptions() );

        if ( FactoryCreate.DefaultObjectCreationFactory.class != annotation.factoryClass() )
        {
            builder.ofType( annotation.factoryClass() );
        }
    }

}
View Full Code Here

Examples of org.apache.commons.digester3.binder.NodeCreateRuleProvider.ofType()

        String nodeType = attributes.getValue( "type" );
        if ( nodeType != null && nodeType.length() > 0 )
        {
            if ( "element".equals( nodeType ) )
            {
                nodeProvider.ofType( NodeType.ELEMENT );
            }
            else if ( "fragment".equals( nodeType ) )
            {
                nodeProvider.ofType( NodeType.DOCUMENT_FRAGMENT );
            }
View Full Code Here

Examples of org.apache.commons.digester3.binder.NodeCreateRuleProvider.ofType()

            {
                nodeProvider.ofType( NodeType.ELEMENT );
            }
            else if ( "fragment".equals( nodeType ) )
            {
                nodeProvider.ofType( NodeType.DOCUMENT_FRAGMENT );
            }
            else
            {
                throw new RuntimeException( format(
                    "Unrecognized node type: %s. This attribute is optional or can have a value of element|fragment.",
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.