public interface ModuleAssembly
Use the methods and the fluent API's to declare how the module should be constructed.
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> |
visit(AssemblyVisitor<ThrowableType> visitor) |
ModuleAssembly |
withActivators(Class<? extends Activator<Module>>... activators)
Set the module activators.
|
LayerAssembly layer()
ModuleAssembly module(String layerName, String moduleName)
layerName
- The name of the LayermoduleName
- The name of the Module to retrieve or create.ModuleAssembly setName(String name)
name
- The name that this Module should have.String name()
ModuleAssembly setMetaInfo(Object info)
ModuleAssembly withActivators(Class<? extends Activator<Module>>... activators)
activators
- the module activatorsTransientDeclaration transients(Class<?>... transientTypes)
transientTypes
- The types that specifies the Transient types.TransientDeclaration transients(Specification<? super TransientAssembly> specification)
specification
- The Specification that specifies the TransientComposite types of interest.ValueDeclaration values(Class<?>... valueTypes)
valueTypes
- The types that specifies the Value types.ValueDeclaration values(Specification<? super ValueAssembly> specification)
specification
- The Specification that specifies the ValueComposite types of interest.EntityDeclaration entities(Class<?>... entityTypes)
entityTypes
- The types that specifies the Entity types.EntityDeclaration entities(Specification<? super EntityAssembly> specification)
specification
- The Specification that specifies the EntityComposite types of interest.ConfigurationDeclaration configurations(Class<?>... configurationTypes)
configurationTypes
- The types that specifies the Configuration types.ConfigurationDeclaration configurations(Specification<HasTypes> specification)
specification
- The Specification that specifies the ConfigurationComposite types of interest.ObjectDeclaration objects(Class<?>... objectTypes) throws AssemblyException
objectTypes
- The types that specifies the Object types.AssemblyException
ObjectDeclaration objects(Specification<? super ObjectAssembly> specification)
specification
- The Specification that specifies the Object types of interest.ServiceDeclaration addServices(Class<?>... serviceTypes)
serviceTypes
- The types that specifies the Service types.ServiceDeclaration services(Class<?>... serviceTypes)
serviceTypes
- The types that specifies the Service types.ServiceDeclaration services(Specification<? super ServiceAssembly> specification)
specification
- The Specification that specifies the ServiceComposite types of interest.ImportedServiceDeclaration importedServices(Class<?>... serviceTypes)
serviceTypes
- The types that specifies the Imported Service types.ImportedServiceDeclaration importedServices(Specification<? super ImportedServiceAssembly> specification)
specification
- The Specification that specifies the Imported Service types of interest.<T> MixinDeclaration<T> forMixin(Class<T> mixinType)
<ThrowableType extends Throwable> void visit(AssemblyVisitor<ThrowableType> visitor) throws ThrowableType extends Throwable
ThrowableType extends Throwable