public class BlueprintRepository extends Object implements Repository, ExecutionContext
ExecutionContext.Holder| Constructor and Description |
|---|
BlueprintRepository(ExtendedBlueprintContainer container) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFullObject(String name,
Object object) |
void |
addPartialObject(String name,
Object object) |
boolean |
canConvert(Object value,
ReifiedType type) |
boolean |
containsObject(String name)
Does this context contain a object with the specified name.
|
Object |
convert(Object value,
ReifiedType type) |
Object |
create(String name) |
Map<String,Object> |
createAll(Collection<String> names) |
void |
destroy() |
<T> List<T> |
getAllRecipes(Class<T> clazz,
String... names) |
Set<Recipe> |
getAllRecipes(String... names) |
Object |
getInstance(String name)
Return the singleton instance for the given name.
|
Object |
getInstanceLock()
Lock that should be used to synchronized creation of singletons
|
Set<String> |
getNames()
Returns the set of all known object names (recipes, instances or default objects)
|
Object |
getObject(String name)
Gets the object or recipe with the specified name from the repository.
|
Object |
getPartialObject(String name) |
Recipe |
getRecipe(String name)
Return the recipe for the given name.
|
LinkedList<Recipe> |
getStack() |
Class |
loadClass(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(String name,
Recipe recipe) |
Object |
removePartialObject(String name) |
void |
removeRecipe(String name)
Remove an uninstantiated recipe
|
void |
validate() |
public BlueprintRepository(ExtendedBlueprintContainer container)
public Object getInstance(String name)
RepositorygetInstance in interface Repositorynullpublic Recipe getRecipe(String name)
RepositorygetRecipe in interface ExecutionContextgetRecipe in interface Repositorynullpublic Set<String> getNames()
RepositorygetNames in interface Repositorypublic void putRecipe(String name, Recipe recipe)
putRecipe in interface Repositorypublic void removeRecipe(String name)
RepositoryremoveRecipe in interface Repositorypublic Object create(String name) throws ComponentDefinitionException
create in interface RepositoryComponentDefinitionExceptionpublic Map<String,Object> createAll(Collection<String> names) throws ComponentDefinitionException
createAll in interface RepositoryComponentDefinitionExceptionpublic <T> List<T> getAllRecipes(Class<T> clazz, String... names)
getAllRecipes in interface Repositorypublic Set<Recipe> getAllRecipes(String... names)
getAllRecipes in interface Repositorypublic void validate()
public void destroy()
destroy in interface Repositorypublic Object getInstanceLock()
RepositorygetInstanceLock in interface ExecutionContextgetInstanceLock in interface Repositorypublic void push(Recipe recipe)
ExecutionContextpush in interface ExecutionContextrecipe - the recipe to add to the stackpublic Recipe pop()
ExecutionContextpop in interface ExecutionContextpublic LinkedList<Recipe> getStack()
public boolean containsObject(String name)
ExecutionContextcontainsObject in interface ExecutionContextname - the unique name of the object instancepublic Object getObject(String name)
ExecutionContextgetObject in interface ExecutionContextname - the unique name of the object instancepublic void addFullObject(String name, Object object)
addFullObject in interface ExecutionContextpublic void addPartialObject(String name, Object object)
addPartialObject in interface ExecutionContextpublic Object removePartialObject(String name)
removePartialObject in interface ExecutionContextpublic Object getPartialObject(String name)
getPartialObject in interface ExecutionContextpublic Object convert(Object value, ReifiedType type) throws Exception
convert in interface ExecutionContextExceptionpublic boolean canConvert(Object value, ReifiedType type)
canConvert in interface ExecutionContextpublic Class loadClass(String typeName) throws ClassNotFoundException
loadClass in interface ExecutionContextClassNotFoundExceptionCopyright © 2012. All Rights Reserved.