org.apache.commons.inject.api
Class CommonsInject

java.lang.Object
  extended by org.apache.commons.inject.api.CommonsInject

public class CommonsInject
extends Object

This class provides the anchor point to create injectors via factory methods.


Constructor Summary
CommonsInject()
           
 
Method Summary
static IInjector build(Collection<IModule> pModules)
          Creates a new injector, which is configured by invoking the given modules.
static IInjector build(IModule... pModules)
          Creates a new injector, which is configured by invoking the given modules.
static IInjectorBuilder newBuilder()
          An alternative to build(IModule...), which provides additional control on the injectors configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsInject

public CommonsInject()
Method Detail

build

public static IInjector build(IModule... pModules)
Creates a new injector, which is configured by invoking the given modules.

Parameters:
pModules - The modules, which provide the injectors bindings.
Returns:
A new injector.
See Also:
build(Collection)

build

public static IInjector build(Collection<IModule> pModules)
Creates a new injector, which is configured by invoking the given modules.

Parameters:
pModules - The modules, which provide the injectors bindings.
Returns:
A new injector.
See Also:
build(IModule...)

newBuilder

public static IInjectorBuilder newBuilder()
An alternative to build(IModule...), which provides additional control on the injectors configuration. Rather than directly returning an injector, this method returns an injector builder.

Returns:
A new injector builder.
See Also:
build(IModule...), build(Collection)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.