private static class ObjectGraph.WrapperExecutionContext extends ExecutionContext
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,java.lang.Object> |
constructedObject |
private ExecutionContext |
executionContext |
| Modifier | Constructor and Description |
|---|---|
private |
WrapperExecutionContext(ExecutionContext executionContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(java.lang.String name,
java.lang.Object object)
Add an object to the repository.
|
void |
addReference(Reference reference)
Adds a reference to an object to this context.
|
boolean |
containsObject(java.lang.String name)
Does this context contain a object with the specified name.
|
java.lang.ClassLoader |
getClassLoader()
Gets the class loader used for loading of all classes during the
life of this execution context
|
java.util.Map<java.lang.String,java.lang.Object> |
getConstructedObject() |
java.lang.Object |
getObject(java.lang.String name)
Gets the object or recipe with the specified name from the repository.
|
java.util.LinkedList<Recipe> |
getStack()
Gets a snapshot of the current execution stack.
|
java.util.Map<java.lang.String,java.util.List<Reference>> |
getUnresolvedRefs()
Gets the unresolved references by name.
|
Recipe |
pop()
Removes the top recipe from the execution stack.
|
void |
push(Recipe recipe)
Adds a recipe to the top of the execution stack.
|
getContext, isContextSet, setContextprivate final ExecutionContext executionContext
private final java.util.Map<java.lang.String,java.lang.Object> constructedObject
private WrapperExecutionContext(ExecutionContext executionContext)
public java.util.Map<java.lang.String,java.lang.Object> getConstructedObject()
public void push(Recipe recipe) throws CircularDependencyException
ExecutionContextpush in class ExecutionContextrecipe - the recipe to add to the stackCircularDependencyException - if the recipe is already on the stackpublic Recipe pop()
ExecutionContextpop in class ExecutionContextpublic java.util.LinkedList<Recipe> getStack()
ExecutionContextgetStack in class ExecutionContextpublic java.lang.Object getObject(java.lang.String name)
ExecutionContextgetObject in class ExecutionContextname - the unique name of the object instancepublic boolean containsObject(java.lang.String name)
ExecutionContextcontainsObject in class ExecutionContextname - the unique name of the object instancepublic void addObject(java.lang.String name,
java.lang.Object object)
ExecutionContextaddObject in class ExecutionContextname - the unique name of the object instanceobject - the object instancepublic void addReference(Reference reference)
ExecutionContextaddReference in class ExecutionContextreference - the reference to setpublic java.util.Map<java.lang.String,java.util.List<Reference>> getUnresolvedRefs()
ExecutionContextgetUnresolvedRefs in class ExecutionContextpublic java.lang.ClassLoader getClassLoader()
ExecutionContextgetClassLoader in class ExecutionContext