com.hammurapi.common

## Interface Context

- All Known Subinterfaces:
    ExecutionContext<KP>, MutableContext
  All Known Implementing Classes:
    CompositeContext, DefaultContext, FacadeContext, SimpleMutableContext, SingletonChainingContext

      public interface Context

  Execution context.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Context` | `INSTANCE` Context constructed from all available context services.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `lookup(Class<T> serviceClass, Predicate<T,Context>... selectors)` Looks up single object (service) by type.
    `Object` | `lookup(String name)` Looks up object by name.
    `<T> Iterator<T>` | `lookupAll(Class<T> serviceClass, Predicate<T,Context>... selectors)` Looks up all services of given type.

- - ### Field Detail

    - #### INSTANCE

          static final Context INSTANCE

      Context constructed from all available context services.

  - ### Method Detail

    - #### lookup

          Object lookup(String name)

      Looks up object by name.
      Parameters:
        `name` - Object name.
      Returns:
        named object or null.

    - #### lookup

          <T> T lookup(Class<T> serviceClass,
                     Predicate<T,Context>... selectors)

      Looks up single object (service) by type.
      Type Parameters:
        `T` - Service type.
      Parameters:
        `serviceClass` - Requested service type.
        `selectors` - Optional service selectors. If more than one, selectors are combined with AND.
      Returns:
        Service instance or null.

    - #### lookupAll

          <T> Iterator<T> lookupAll(Class<T> serviceClass,
                                  Predicate<T,Context>... selectors)

      Looks up all services of given type.
      Type Parameters:
        `T` - Service type.
      Parameters:
        `serviceClass` - Requested service type.
        `selectors` - Optional service selectors. If more than one, selectors are combined with AND.
      Returns:
        Iterator over services of requested type.