org.jvnet.hk2.component
Class InjectionManager

java.lang.Object
  extended by org.jvnet.hk2.component.InjectionManager

public class InjectionManager
extends java.lang.Object

InjectionManager is responsible for injecting resources into a component. Injection targets are identified by the injection resolver type attribute.

Author:
Jerome Dochez

Constructor Summary
InjectionManager()
           
 
Method Summary
 void inject(java.lang.Object component, java.lang.Class type, InjectionResolver... targets)
          Initializes the component by performing injection.
 void inject(java.lang.Object component, Inhabitant<?> onBehalfOf, java.lang.Class type, InjectionResolver... targets)
          Initializes the component by performing injection.
 void inject(java.lang.Object component, Inhabitant<?> onBehalfOf, InjectionResolver... targets)
          Initializes the component by performing injection.
 void inject(java.lang.Object component, InjectionResolver... targets)
          Initializes the component by performing injection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectionManager

public InjectionManager()
Method Detail

inject

public void inject(java.lang.Object component,
                   InjectionResolver... targets)
Initializes the component by performing injection.

Parameters:
component - component instance to inject
targets - the injection resolvers to resolve all injection points
Throws:
ComponentException - if injection failed for some reason.

inject

public void inject(java.lang.Object component,
                   Inhabitant<?> onBehalfOf,
                   InjectionResolver... targets)
Initializes the component by performing injection.

Parameters:
component - component instance to inject
onBehalfOf - the inhabitant to do injection on behalf of
targets - the injection resolvers to resolve all injection points
Throws:
ComponentException - if injection failed for some reason.

inject

public void inject(java.lang.Object component,
                   java.lang.Class type,
                   InjectionResolver... targets)
Initializes the component by performing injection.

Parameters:
component - component instance to inject
type - component class
targets - the injection resolvers to resolve all injection points
Throws:
ComponentException - if injection failed for some reason.

inject

public void inject(java.lang.Object component,
                   Inhabitant<?> onBehalfOf,
                   java.lang.Class type,
                   InjectionResolver... targets)
Initializes the component by performing injection.

Parameters:
component - component instance to inject
onBehalfOf - the inhabitant to do injection on behalf of
type - component class
targets - the injection resolvers to resolve all injection points
Throws:
ComponentException - if injection failed for some reason.


Copyright © 2010 Sun Microsystems, Inc.. All Rights Reserved.