public final class ContainerDefinition extends 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.
| Constructor and Description |
|---|
ContainerDefinition(String name,
ContainerDefinition base,
ContainerDefinition parent,
Map<String,ComponentRef> namedMap,
Map<Class<?>,ComponentRef> declaredMap,
Map<Class<?>,ComponentRef> actualMap,
int index) |
| Modifier and Type | Method and Description |
|---|---|
ComponentRef |
findComponentReference(Class<?> cls) |
ComponentRef |
findComponentReference(String name) |
int |
getContainerIndex() |
String |
getName() |
ContainerDefinition |
getParentDefinition() |
public ContainerDefinition(String name, ContainerDefinition base, ContainerDefinition parent, Map<String,ComponentRef> namedMap, Map<Class<?>,ComponentRef> declaredMap, Map<Class<?>,ComponentRef> actualMap, int index)
public ContainerDefinition getParentDefinition()
public String getName()
public int getContainerIndex()
public ComponentRef findComponentReference(String name)
public ComponentRef findComponentReference(Class<?> cls)
Copyright © 2017 etc.to. All rights reserved.