|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.aries.blueprint.container.BlueprintRepository
public class BlueprintRepository
The default repository implementation
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.aries.blueprint.di.ExecutionContext |
---|
ExecutionContext.Holder |
Constructor Summary | |
---|---|
BlueprintRepository(ExtendedBlueprintContainer container)
|
Method Summary | ||
---|---|---|
void |
addFullObject(java.lang.String name,
java.lang.Object object)
|
|
void |
addPartialObject(java.lang.String name,
java.lang.Object object)
|
|
boolean |
canConvert(java.lang.Object value,
ReifiedType type)
|
|
boolean |
containsObject(java.lang.String name)
Does this context contain a object with the specified name. |
|
java.lang.Object |
convert(java.lang.Object value,
ReifiedType type)
|
|
java.lang.Object |
create(java.lang.String name)
|
|
java.util.Map<java.lang.String,java.lang.Object> |
createAll(java.util.Collection<java.lang.String> names)
|
|
void |
destroy()
|
|
|
getAllRecipes(java.lang.Class<T> clazz,
java.lang.String... names)
|
|
java.util.Set<Recipe> |
getAllRecipes(java.lang.String... names)
|
|
java.lang.Object |
getInstance(java.lang.String name)
Return the singleton instance for the given name. |
|
java.lang.Object |
getInstanceLock()
Lock that should be used to synchronized creation of singletons |
|
java.util.Set<java.lang.String> |
getNames()
Returns the set of all known object names (recipes, instances or default objects) |
|
java.lang.Object |
getObject(java.lang.String name)
Gets the object or recipe with the specified name from the repository. |
|
java.lang.Object |
getPartialObject(java.lang.String name)
|
|
Recipe |
getRecipe(java.lang.String name)
Return the recipe for the given name. |
|
java.util.LinkedList<Recipe> |
getStack()
|
|
java.lang.Class |
loadClass(java.lang.String typeName)
|
|
Recipe |
pop()
Removes the top recipe from the execution stack. |
|
void |
push(Recipe recipe)
Adds a recipe to the top of the execution stack. |
|
void |
putRecipe(java.lang.String name,
Recipe recipe)
|
|
java.lang.Object |
removePartialObject(java.lang.String name)
|
|
void |
removeRecipe(java.lang.String name)
Remove an uninstantiated recipe |
|
void |
validate()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlueprintRepository(ExtendedBlueprintContainer container)
Method Detail |
---|
public java.lang.Object getInstance(java.lang.String name)
Repository
getInstance
in interface Repository
null
public Recipe getRecipe(java.lang.String name)
Repository
getRecipe
in interface ExecutionContext
getRecipe
in interface Repository
null
public java.util.Set<java.lang.String> getNames()
Repository
getNames
in interface Repository
public void putRecipe(java.lang.String name, Recipe recipe)
putRecipe
in interface Repository
public void removeRecipe(java.lang.String name)
Repository
removeRecipe
in interface Repository
public java.lang.Object create(java.lang.String name) throws ComponentDefinitionException
create
in interface Repository
ComponentDefinitionException
public java.util.Map<java.lang.String,java.lang.Object> createAll(java.util.Collection<java.lang.String> names) throws ComponentDefinitionException
createAll
in interface Repository
ComponentDefinitionException
public <T> java.util.List<T> getAllRecipes(java.lang.Class<T> clazz, java.lang.String... names)
getAllRecipes
in interface Repository
public java.util.Set<Recipe> getAllRecipes(java.lang.String... names)
getAllRecipes
in interface Repository
public void validate()
public void destroy()
destroy
in interface Repository
public java.lang.Object getInstanceLock()
Repository
getInstanceLock
in interface ExecutionContext
getInstanceLock
in interface Repository
public void push(Recipe recipe)
ExecutionContext
push
in interface ExecutionContext
recipe
- the recipe to add to the stackpublic Recipe pop()
ExecutionContext
pop
in interface ExecutionContext
public java.util.LinkedList<Recipe> getStack()
public boolean containsObject(java.lang.String name)
ExecutionContext
containsObject
in interface ExecutionContext
name
- the unique name of the object instance
public java.lang.Object getObject(java.lang.String name)
ExecutionContext
getObject
in interface ExecutionContext
name
- the unique name of the object instance
public void addFullObject(java.lang.String name, java.lang.Object object)
addFullObject
in interface ExecutionContext
public void addPartialObject(java.lang.String name, java.lang.Object object)
addPartialObject
in interface ExecutionContext
public java.lang.Object removePartialObject(java.lang.String name)
removePartialObject
in interface ExecutionContext
public java.lang.Object getPartialObject(java.lang.String name)
getPartialObject
in interface ExecutionContext
public java.lang.Object convert(java.lang.Object value, ReifiedType type) throws java.lang.Exception
convert
in interface ExecutionContext
java.lang.Exception
public boolean canConvert(java.lang.Object value, ReifiedType type)
canConvert
in interface ExecutionContext
public java.lang.Class loadClass(java.lang.String typeName) throws java.lang.ClassNotFoundException
loadClass
in interface ExecutionContext
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |