org.apache.commons.inject.impl
Class AbstractBaseProvider<T>

java.lang.Object
  extended by org.apache.commons.inject.impl.AbstractBaseProvider<T>
All Implemented Interfaces:
Provider<T>, IProvider<T>, IInjectorAware
Direct Known Subclasses:
DefaultProvider, FactoryMethodProvider

public abstract class AbstractBaseProvider<T>
extends Object
implements IProvider<T>, IInjectorAware

Abstract implementation of a base provider: In general, bindings are using a scoped provider, which controls the bindings scope (When is the instance created?) The actual instantiation, and the injection of values, is delegated to the base provider. (How is the instance created?)


Constructor Summary
protected AbstractBaseProvider(Class<T> pType, IPoint<T> pPoint)
          Creates a new base provider.
 
Method Summary
 T get(IInjector pInjector)
           
 Class<T> getType()
           
 void init(IInjector pInjector)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.inject.Provider
get
 

Constructor Detail

AbstractBaseProvider

protected AbstractBaseProvider(Class<T> pType,
                               IPoint<T> pPoint)
Creates a new base provider.

Parameters:
pType - The type of the instance, which is being created by the provider.
pPoint - The point, which is being used to inject values into the created instance.
Method Detail

get

public T get(IInjector pInjector)
Specified by:
get in interface IProvider<T>

getType

public Class<T> getType()
Specified by:
getType in interface IProvider<T>

init

public void init(IInjector pInjector)
Specified by:
init in interface IInjectorAware


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