Class DefaultRepository

java.lang.Object
org.apache.xbean.recipe.DefaultRepository
All Implemented Interfaces:
Repository

public class DefaultRepository extends Object implements Repository
  • Constructor Details

    • DefaultRepository

      public DefaultRepository()
  • Method Details

    • 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 instance
      instance - the instance
      Throws:
      ConstructionException - if another object instance is already registered with the name