Interface Repository

All Known Implementing Classes:
DefaultRepository

public interface Repository
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(String name, Object object)
    Add an object to the repository.
    boolean
    Does this repository contain a object with the specified name.
    get(String name)
    Gets the object or recipe with the specified name from the repository.
  • Method Details

    • 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