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
 EntityDeclaration addEntities(Class<? extends EntityComposite>... compositeTypes)
          Deprecated. 
 ObjectDeclaration addObjects(Class<?>... objectTypes)
          Deprecated. 
 ServiceDeclaration addServices(Class<? extends ServiceComposite>... serviceTypes)
          Create a list of ServiceComposites for this Module.
 TransientDeclaration addTransients(Class<? extends TransientComposite>... compositeTypes)
          Deprecated. 
 ValueDeclaration addValues(Class<? extends ValueComposite>... compositeTypes)
          Deprecated. 
 EntityDeclaration entities(Class<? extends EntityComposite>... compositeTypes)
          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.
 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<? extends ServiceComposite>... 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 setName(String name)
          Set the name of this module.
 TransientDeclaration transients(Class<? extends TransientComposite>... compositeTypes)
          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<? extends ValueComposite>... compositeTypes)
          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)
           
 

Method Detail

layer

LayerAssembly layer()
Access the layer assembly for this module.

Returns:

setName

ModuleAssembly setName(String name)
Set the name of this module.

Parameters:
name -
Returns:

name

String name()
Access the currently set name for this module.

Returns:

addTransients

@Deprecated
TransientDeclaration addTransients(Class<? extends TransientComposite>... compositeTypes)
Deprecated. 


transients

TransientDeclaration transients(Class<? extends TransientComposite>... compositeTypes)
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:
compositeTypes -
Returns:

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 -
Returns:

addValues

@Deprecated
ValueDeclaration addValues(Class<? extends ValueComposite>... compositeTypes)
Deprecated. 


values

ValueDeclaration values(Class<? extends ValueComposite>... compositeTypes)
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:
compositeTypes -
Returns:

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 -
Returns:

addEntities

@Deprecated
EntityDeclaration addEntities(Class<? extends EntityComposite>... compositeTypes)
Deprecated. 


entities

EntityDeclaration entities(Class<? extends EntityComposite>... compositeTypes)
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:
compositeTypes -
Returns:

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 -
Returns:

addObjects

@Deprecated
ObjectDeclaration addObjects(Class<?>... objectTypes)
Deprecated. 


objects

ObjectDeclaration objects(Class<?>... objectTypes)
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 -
Returns:

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 -
Returns:

addServices

ServiceDeclaration addServices(Class<? extends ServiceComposite>... 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 -
Returns:

services

ServiceDeclaration services(Class<? extends ServiceComposite>... 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 -
Returns:

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 -
Returns:

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 -
Returns:

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 -
Returns:

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