to.etc.iocular.def
Class ContainerDefinition

java.lang.Object
  extended by to.etc.iocular.def.ContainerDefinition

public final class ContainerDefinition
extends java.lang.Object

A container definition contains the compiled form of the configuration of a single container in a container tree. The container definition can be inherited from another definition; in that case the definition of the "base" container is extended by the definitions of this container. The whole definition still pertains to a single container though.

The most common form of inter-definition dependency is the "parent container" or "parent" link. This defines this configuration to be for a container that has another container as a parent. The parent-child relationship is used when for instance the parent and child containers have different scope and lifecycle rules.

The container definition gets completed and checked when configuration has completed. At that time the builders will check all of the data pertaining to the containers and will create build plans for all of the defined artifacts. If, during this process, it is determined that any object cannot be built using the definitions in the configuration then an error will be thrown and the container definition will not be created.

Author:
jal Created on Apr 3, 2007

Constructor Summary
ContainerDefinition(java.lang.String name, ContainerDefinition base, ContainerDefinition parent, java.util.Map<java.lang.String,ComponentRef> namedMap, java.util.Map<java.lang.Class<?>,ComponentRef> declaredMap, java.util.Map<java.lang.Class<?>,ComponentRef> actualMap, int index)
           
 
Method Summary
 ComponentRef findComponentReference(java.lang.Class<?> cls)
           
 ComponentRef findComponentReference(java.lang.String name)
           
 int getContainerIndex()
           
 java.lang.String getName()
           
 ContainerDefinition getParentDefinition()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerDefinition

public ContainerDefinition(java.lang.String name,
                           ContainerDefinition base,
                           ContainerDefinition parent,
                           java.util.Map<java.lang.String,ComponentRef> namedMap,
                           java.util.Map<java.lang.Class<?>,ComponentRef> declaredMap,
                           java.util.Map<java.lang.Class<?>,ComponentRef> actualMap,
                           int index)
Method Detail

getParentDefinition

public ContainerDefinition getParentDefinition()

getName

public java.lang.String getName()

getContainerIndex

public int getContainerIndex()

findComponentReference

public ComponentRef findComponentReference(java.lang.String name)

findComponentReference

public ComponentRef findComponentReference(java.lang.Class<?> cls)