Package org.apache.xbean.recipe
Class DefaultRepository
java.lang.Object
org.apache.xbean.recipe.DefaultRepository
- All Implemented Interfaces:
Repository
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an object instance to this repository.boolean
Does this repository contain a object with the specified name.Gets the object or recipe with the specified name from this repository.
-
Field Details
-
instances
The unmarshaled object instances by name.
-
-
Constructor Details
-
DefaultRepository
public DefaultRepository()
-
-
Method Details
-
contains
Does this repository contain a object with the specified name.- Specified by:
contains
in interfaceRepository
- Parameters:
name
- the unique name of the object instance- Returns:
- true if this repository contain a object with the specified name
-
get
Gets the object or recipe with the specified name from this repository.- Specified by:
get
in interfaceRepository
- Parameters:
name
- the unique name of the object instance- Returns:
- the object instance, a recipe to build the object or null
-
add
Add an object instance to this repository.- Specified by:
add
in interfaceRepository
- Parameters:
name
- the unique name of the instanceinstance
- the instance- Throws:
ConstructionException
- if another object instance is already registered with the name
-