org.apache.xbean.recipe
Interface Repository

All Known Implementing Classes:
DefaultRepository

public interface Repository


Method Summary
 void add(java.lang.String name, java.lang.Object object)
          Add an object to the repository.
 boolean contains(java.lang.String name)
          Does this repository contain a object with the specified name.
 java.lang.Object get(java.lang.String name)
          Gets the object or recipe with the specified name from the repository.
 

Method Detail

contains

boolean contains(java.lang.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

java.lang.Object get(java.lang.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(java.lang.String name,
         java.lang.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-2011. All Rights Reserved.