org.qi4j.bootstrap

## Interface ModuleAssembly

-     public interface ModuleAssembly

  The ModuleAssembly is used to register any information about * what the module should contain, such as composites, entities and services.

  Use the methods and the fluent API's to declare how the module should be constructed.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ServiceDeclaration` | `addServices(Class<?>... serviceTypes)` Create a list of ServiceComposites for this Module.
    `ConfigurationDeclaration` | `configurations(Class<?>... configurationTypes)` Declare a list of Configuration Composites for this Module.
    `ConfigurationDeclaration` | `configurations(Specification<HasTypes> specification)` Given a Specification for ConfigurationAssembly's, returns a ConfigurationDeclaration that can be used to work with all of the assemblies matched by the specification.
    `EntityDeclaration` | `entities(Class<?>... entityTypes)` Declare a list of EntityComposites for this Module.
    `EntityDeclaration` | `entities(Specification<? super EntityAssembly> specification)` Given a Specification for EntityAssembly's, returns a EntityDeclaration that can be used to work with all of the assemblies matched by the specification.
    `<T> MixinDeclaration<T>` | `forMixin(Class<T> mixinType)`
    `ImportedServiceDeclaration` | `importedServices(Class<?>... serviceTypes)` Declare a list of imported services for this Module.
    `ImportedServiceDeclaration` | `importedServices(Specification<? super ImportedServiceAssembly> specification)` Given a Specification for ImportedServiceAssembly's, returns a ImportedServiceDeclaration that can be used to work with all of the assemblies matched by the specification.
    `LayerAssembly` | `layer()` Access the layer assembly for this module.
    `ModuleAssembly` | `module(String layerName, String moduleName)` Get an assembly for a particular Module.
    `String` | `name()` Access the currently set name for this module.
    `ObjectDeclaration` | `objects(Class<?>... objectTypes)` Declare a list of object classes for this Module.
    `ObjectDeclaration` | `objects(Specification<? super ObjectAssembly> specification)` Given a Specification for ObjectAssembly's, returns a ObjectDeclaration that can be used to work with all of the assemblies matched by the specification.
    `ServiceDeclaration` | `services(Class<?>... serviceTypes)` Declare a list of ServiceComposites for this Module.
    `ServiceDeclaration` | `services(Specification<? super ServiceAssembly> specification)` Given a Specification for ServiceAssembly's, returns a ServiceDeclaration that can be used to work with all of the assemblies matched by the specification.
    `ModuleAssembly` | `setMetaInfo(Object info)`
    `ModuleAssembly` | `setName(String name)` Set the name of this module.
    `TransientDeclaration` | `transients(Class<?>... transientTypes)` Declare a list of TransientComposites for this Module.
    `TransientDeclaration` | `transients(Specification<? super TransientAssembly> specification)` Given a Specification for TransientAssembly's, returns a TransientDeclaration that can be used to work with all of the assemblies matched by the specification.
    `ValueDeclaration` | `values(Class<?>... valueTypes)` Declare a list of ValueComposites for this Module.
    `ValueDeclaration` | `values(Specification<? super ValueAssembly> specification)` Given a Specification for ValueAssembly's, returns a ValueDeclaration that can be used to work with all of the assemblies matched by the specification.
    `<ThrowableType extends Throwable> void` | `visit(AssemblyVisitor<ThrowableType> visitor)`
    `ModuleAssembly` | `withActivators(Class<? extends Activator<Module>>... activators)` Set the module activators.

- - ### Method Detail

    - #### layer

          LayerAssembly layer()

      Access the layer assembly for this module.
      Returns:
        The Layer containing this Module.

    - #### module

          ModuleAssembly module(String layerName,
                              String moduleName)

      Get an assembly for a particular Module. If this is called many times with the same names, then the same module is affected.
      Parameters:
        `layerName` - The name of the Layer
        `moduleName` - The name of the Module to retrieve or create.
      Returns:
        The ModuleAssembly for the Module.

    - #### setName

          ModuleAssembly setName(String name)

      Set the name of this module.
      Parameters:
        `name` - The name that this Module should have.
      Returns:
        This instance to support the fluid DSL of bootstrap.

    - #### name

          String name()

      Access the currently set name for this module.
      Returns:
        The name of this Module.

    - #### setMetaInfo

          ModuleAssembly setMetaInfo(Object info)

    - #### withActivators

          ModuleAssembly withActivators(Class<? extends Activator<Module>>... activators)

      Set the module activators. Activators are executed in order around the Module activation and passivation.
      Parameters:
        `activators` - the module activators
      Returns:
        the assembly

    - #### transients

          TransientDeclaration transients(Class<?>... transientTypes)

      Declare a list of TransientComposites for this Module. Use the TransientDeclaration that is returned to declare further settings. Note that the TransientDeclaration works on all of the types specified.
      Parameters:
        `transientTypes` - The types that specifies the Transient types.
      Returns:
        An TransientDeclaration for the specified Transient types.

    - #### transients

          TransientDeclaration transients(Specification<? super TransientAssembly> specification)

      Given a Specification for TransientAssembly's, returns a TransientDeclaration that can be used to work with all of the assemblies matched by the specification.
      Parameters:
        `specification` - The Specification that specifies the TransientComposite types of interest.
      Returns:
        An TransientDeclaration for the specified TransientComposite types.

    - #### values

          ValueDeclaration values(Class<?>... valueTypes)

      Declare a list of ValueComposites for this Module. Use the ValueDeclaration that is returned to declare further settings. Note that the ValueDeclaration works on all of the types specified.
      Parameters:
        `valueTypes` - The types that specifies the Value types.
      Returns:
        An ValueDeclaration for the specified Value types.

    - #### values

          ValueDeclaration values(Specification<? super ValueAssembly> specification)

      Given a Specification for ValueAssembly's, returns a ValueDeclaration that can be used to work with all of the assemblies matched by the specification.
      Parameters:
        `specification` - The Specification that specifies the ValueComposite types of interest.
      Returns:
        An ValueDeclaration for the specified ValueComposite types.

    - #### entities

          EntityDeclaration entities(Class<?>... entityTypes)

      Declare a list of EntityComposites for this Module. Use the EntityDeclaration that is returned to declare further settings. Note that the EntityDeclaration works on all of the types specified.
      Parameters:
        `entityTypes` - The types that specifies the Entity types.
      Returns:
        An EntityDeclaration for the specified Entity types.

    - #### entities

          EntityDeclaration entities(Specification<? super EntityAssembly> specification)

      Given a Specification for EntityAssembly's, returns a EntityDeclaration that can be used to work with all of the assemblies matched by the specification.
      Parameters:
        `specification` - The Specification that specifies the EntityComposite types of interest.
      Returns:
        An EntityDeclaration for the specified EntityComposite types.

    - #### configurations

          ConfigurationDeclaration configurations(Class<?>... configurationTypes)

      Declare a list of Configuration Composites for this Module. Use the ConfigurationDeclaration that is returned to declare further settings. Note that the ConfigurationDeclaration works on all of the types specified.
      Parameters:
        `configurationTypes` - The types that specifies the Configuration types.
      Returns:
        An ConfigurationDeclaration for the specified Configuration types.

    - #### configurations

          ConfigurationDeclaration configurations(Specification<HasTypes> specification)

      Given a Specification for ConfigurationAssembly's, returns a ConfigurationDeclaration that can be used to work with all of the assemblies matched by the specification.
      Parameters:
        `specification` - The Specification that specifies the ConfigurationComposite types of interest.
      Returns:
        An ConfigurationDeclaration for the specified EntityComposite types.

    - #### objects

          ObjectDeclaration objects(Class<?>... objectTypes)
                                    throws AssemblyException

      Declare a list of object classes for this Module. Use the ObjectDeclaration that is returned to declare further settings. Note that the ObjectDeclaration works on all of the types specified.
      Parameters:
        `objectTypes` - The types that specifies the Object types.
      Returns:
        An ObjectDeclaration for the specified Object types.
      Throws:
        `AssemblyException`

    - #### objects

          ObjectDeclaration objects(Specification<? super ObjectAssembly> specification)

      Given a Specification for ObjectAssembly's, returns a ObjectDeclaration that can be used to work with all of the assemblies matched by the specification.
      Parameters:
        `specification` - The Specification that specifies the Object types of interest.
      Returns:
        An ObjectDeclaration for the specified Object types.

    - #### addServices

          ServiceDeclaration addServices(Class<?>... serviceTypes)

      Create a list of ServiceComposites for this Module. Use the ServiceDeclaration that is returned to declare further settings. This will always create new assemblies for the specified types, instead of potentially working on already declared types like the services(...) method.
      Parameters:
        `serviceTypes` - The types that specifies the Service types.
      Returns:
        An ServiceDeclaration for the specified Service types.

    - #### services

          ServiceDeclaration services(Class<?>... serviceTypes)

      Declare a list of ServiceComposites for this Module. Use the ServiceDeclaration that is returned to declare further settings. Note that the ServiceDeclaration works on all of the types specified.
      Parameters:
        `serviceTypes` - The types that specifies the Service types.
      Returns:
        An ServiceDeclaration for the specified Service types.

    - #### services

          ServiceDeclaration services(Specification<? super ServiceAssembly> specification)

      Given a Specification for ServiceAssembly's, returns a ServiceDeclaration that can be used to work with all of the assemblies matched by the specification.
      Parameters:
        `specification` - The Specification that specifies the ServiceComposite types of interest.
      Returns:
        An ServiceDeclaration for the specified ServiceComposite types.

    - #### importedServices

          ImportedServiceDeclaration importedServices(Class<?>... serviceTypes)

      Declare a list of imported services for this Module. Use the ImportedServiceDeclaration that is returned to declare further settings. Note that the ImportedServiceDeclaration works on all of the types specified.
      Parameters:
        `serviceTypes` - The types that specifies the Imported Service types.
      Returns:
        An ImportedServiceDeclaration for the specified Imported Service types.

    - #### importedServices

          ImportedServiceDeclaration importedServices(Specification<? super ImportedServiceAssembly> specification)

      Given a Specification for ImportedServiceAssembly's, returns a ImportedServiceDeclaration that can be used to work with all of the assemblies matched by the specification.
      Parameters:
        `specification` - The Specification that specifies the Imported Service types of interest.
      Returns:
        An ImportedServiceDeclaration for the specified Imported Service types.

    - #### forMixin

          <T> MixinDeclaration<T> forMixin(Class<T> mixinType)

    - #### visit

          <ThrowableType extends Throwable> void visit(AssemblyVisitor<ThrowableType> visitor)
                     throws ThrowableType extends Throwable

      Throws:
        `ThrowableType extends Throwable`