public interface Container
An actual store of instantiated resources, part of a container tree. A container has a definition determining the possible object wirings, and a store containing the already instantiated objects.
Instantiating a container is a very cheap operation. Objects defined for the container are only retrieved/instantiated when they are needed. The container itself is configured with a predefined ContainerDefinition; the definition is typically created at application startup and *is* expensive to create.
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
<T> T |
findObject(Class<T> theClass)
Return the 'unnamed' object with the specified class from this container.
|
<T> T |
findObject(String name,
Class<T> theClass) |
<T> T |
getObject(Class<T> theClass)
Return the 'unnamed' object with the specified class from this container.
|
<T> T |
getObject(String name,
Class<T> theClass) |
void |
setParameter(Class<?> theClass,
Object instance)
Set the parameter as identified by it's target class to the specified instance.
|
void |
setParameter(Object instance)
Set a container parameter object.
|
void |
setParameter(String name,
Object instance)
Sets the parameter with the specified name to the instance passed.
|
void |
start() |
void start()
void destroy()
<T> T findObject(Class<T> theClass)
theClass - <T> T getObject(Class<T> theClass) throws Exception
theClass - Exceptionvoid setParameter(Object instance)
instance - void setParameter(Class<?> theClass, Object instance)
clz - instance - Copyright © 2017 etc.to. All rights reserved.