001package io.dinject.core;
002
003import io.dinject.BeanContext;
004
005/**
006 * This is the service loader interface defining the bean contexts that can be created.
007 */
008public interface BeanContextFactory {
009
010  /**
011   * Return the name of the bean context (module) this will create.
012   */
013  String getName();
014
015  /**
016   * Return the name of module features this module provides.
017   */
018  String[] getProvides();
019
020  /**
021   * Return the names of bean contexts (modules) that this is dependent on (they need to be built before this one).
022   */
023  String[] getDependsOn();
024
025  /**
026   * Create and return the BeanContext.
027   */
028  BeanContext createContext(Builder parent);
029}