org.apache.xbean.recipe
Class DefaultRepository
java.lang.Object
org.apache.xbean.recipe.DefaultRepository
- All Implemented Interfaces:
- Repository
public class DefaultRepository
- extends Object
- implements Repository
Method Summary |
void |
add(String name,
Object instance)
Add an object instance to this repository. |
boolean |
contains(String name)
Does this repository contain a object with the specified name. |
Object |
get(String name)
Gets the object or recipe with the specified name from this repository. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultRepository
public DefaultRepository()
contains
public boolean contains(String name)
- Does this repository contain a object with the specified name.
- Specified by:
contains
in interface Repository
- Parameters:
name
- the unique name of the object instance
- Returns:
- true if this repository contain a object with the specified name
get
public Object get(String name)
- Gets the object or recipe with the specified name from this repository.
- Specified by:
get
in interface Repository
- Parameters:
name
- the unique name of the object instance
- Returns:
- the object instance, a recipe to build the object or null
add
public void add(String name,
Object instance)
- Add an object instance to this repository.
- Specified by:
add
in interface Repository
- Parameters:
name
- the unique name of the instanceinstance
- the instance
- Throws:
ConstructionException
- if another object instance is already registered with the name
Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.