net.sf.tlc.ioc
Interface IocContainer

All Known Implementing Classes:
EmbeddableContainer

public interface IocContainer

An interface that describes an Inversion-of-Control (Ioc) or dependency-injection container

Author:
aisrael

Method Summary
 void add(java.lang.Object o)
          Adds a previously instantiated object to the container registry.
 java.lang.Object getInstance(java.lang.Class c)
          Attempt to obtain an instance of the requested class with auto-wiring of dependencies.
 void register(java.lang.Class c)
          Registers a class with the IocContainer.
 

Method Detail

register

public void register(java.lang.Class c)
Registers a class with the IocContainer.

Parameters:
c - Class

add

public void add(java.lang.Object o)
Adds a previously instantiated object to the container registry.

Parameters:
o - Object

getInstance

public java.lang.Object getInstance(java.lang.Class c)
Attempt to obtain an instance of the requested class with auto-wiring of dependencies.

Parameters:
c - a class previously registered with the container
Returns:
an instance of the requested class


Copyright © 2005 TheLittleContainer. All Rights Reserved.