org.apache.xbean.recipe
Interface Repository

All Known Implementing Classes:
DefaultRepository

public interface Repository


Method Summary
 void add(String name, Object object)
          Add an object to the 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 the repository.
 

Method Detail

contains

boolean contains(String name)
Does this repository contain a object with the specified name.

Parameters:
name - the unique name of the object instance
Returns:
true if this repository contain a object with the specified name

get

Object get(String name)
Gets the object or recipe with the specified name from the repository.

Parameters:
name - the unique name of the object instance
Returns:
the object instance, a recipe to build the object or null

add

void add(String name,
         Object object)
Add an object to the repository.

Parameters:
name - the unique name of the object instance
object - the object instance
Throws:
ConstructionException - if another object instance is already registered with the name


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.