|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Method Summary | ||
---|---|---|
void |
destroy()
|
|
|
findObject(java.lang.Class<T> theClass)
Return the 'unnamed' object with the specified class from this container. |
|
|
findObject(java.lang.String name,
java.lang.Class<T> theClass)
|
|
|
getObject(java.lang.Class<T> theClass)
Return the 'unnamed' object with the specified class from this container. |
|
|
getObject(java.lang.String name,
java.lang.Class<T> theClass)
|
|
void |
setParameter(java.lang.Class<?> theClass,
java.lang.Object instance)
Set the parameter as identified by it's target class to the specified instance. |
|
void |
setParameter(java.lang.Object instance)
Set a container parameter object. |
|
void |
setParameter(java.lang.String name,
java.lang.Object instance)
Sets the parameter with the specified name to the instance passed. |
|
void |
start()
|
Method Detail |
---|
void start()
void destroy()
<T> T findObject(java.lang.Class<T> theClass)
theClass
-
<T> T getObject(java.lang.Class<T> theClass) throws java.lang.Exception
theClass
-
java.lang.Exception
<T> T findObject(java.lang.String name, java.lang.Class<T> theClass)
<T> T getObject(java.lang.String name, java.lang.Class<T> theClass) throws java.lang.Exception
java.lang.Exception
void setParameter(java.lang.Object instance)
instance
- void setParameter(java.lang.Class<?> theClass, java.lang.Object instance)
clz
- instance
- void setParameter(java.lang.String name, java.lang.Object instance)
name
- instance
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |