Package org.apache.tapestry5.ioc.internal

## Class DefaultModuleDefImpl

- java.lang.Object
- - org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl

- All Implemented Interfaces:
    `ModuleDef`, `ModuleDef2`, `ServiceDefAccumulator`

      public class DefaultModuleDefImpl
      extends java.lang.Object
      implements ModuleDef2, ServiceDefAccumulator

  Starting from the Class for a module, identifies all the services (service builder methods), decorators (service decorator methods) and (not yet implemented) contributions (service contributor methods).

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultModuleDefImpl​(java.lang.Class<?> moduleClass, org.slf4j.Logger logger, PlasticProxyFactory proxyFactory)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addServiceDef​(ServiceDef serviceDef)` |
    `java.util.Set<AdvisorDef>` | `getAdvisorDefs()` | Returns all the service advisor definitions built/provided by this module.
    `java.lang.Class` | `getBuilderClass()` | Returns the class that will be instantiated.
    `java.util.Set<ContributionDef>` | `getContributionDefs()` | Returns all the contribution definitions built/provided by this module.
    `java.util.Set<DecoratorDef>` | `getDecoratorDefs()` | Returns all the decorator definitions built/provided by this module.
    `java.lang.String` | `getLoggerName()` | Returns the name used to create a `Logger` instance.
    `ServiceDef` | `getServiceDef​(java.lang.String serviceId)` | Returns a service definition via the service's id.
    `java.util.Set<java.lang.String>` | `getServiceIds()` | Returns the ids of the services built/provided by the module.
    `java.util.Set<StartupDef>` | `getStartups()` | Methods marked with @Startup are converted into Runnable instances and assigned here.
    `java.lang.String` | `toString()` | Identifies the module class and a list of service ids within the module.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultModuleDefImpl

          public DefaultModuleDefImpl​(java.lang.Class<?> moduleClass,
                                      org.slf4j.Logger logger,
                                      PlasticProxyFactory proxyFactory)

      Parameters:
        `moduleClass` - the class that is responsible for building services, etc.
        `logger` - based on the class name of the module
        `proxyFactory` - factory used to create proxy classes at runtime

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Identifies the module class and a list of service ids within the module.
      Overrides:
        `toString` in class `java.lang.Object`

    - #### getBuilderClass

          public java.lang.Class getBuilderClass()

      Description copied from interface: `ModuleDef`
      Returns the class that will be instantiated. Annotated instance methods of this class are invoked to build services, to decorate/intercept services, and make contributions to other services. Note: this name is maintained for compatibilty; the term "module builder" is now just "module class".
      Specified by:
        `getBuilderClass` in interface `ModuleDef`

    - #### getServiceIds

          public java.util.Set<java.lang.String> getServiceIds()

      Description copied from interface: `ModuleDef`
      Returns the ids of the services built/provided by the module.
      Specified by:
        `getServiceIds` in interface `ModuleDef`

    - #### getServiceDef

          public ServiceDef getServiceDef​(java.lang.String serviceId)

      Description copied from interface: `ModuleDef`
      Returns a service definition via the service's id. Ideally, the returned value should be an instance of `ServiceDef2`, and will be converted to such if necessary.
      Specified by:
        `getServiceDef` in interface `ModuleDef`
      Parameters:
        `serviceId` - the id of the service to retrieve (case is ignored)
      Returns:
        service definition or null if it doesn't exist

    - #### addServiceDef

          public void addServiceDef​(ServiceDef serviceDef)

      Specified by:
        `addServiceDef` in interface `ServiceDefAccumulator`

    - #### getDecoratorDefs

          public java.util.Set<DecoratorDef> getDecoratorDefs()

      Description copied from interface: `ModuleDef`
      Returns all the decorator definitions built/provided by this module.
      Specified by:
        `getDecoratorDefs` in interface `ModuleDef`

    - #### getContributionDefs

          public java.util.Set<ContributionDef> getContributionDefs()

      Description copied from interface: `ModuleDef`
      Returns all the contribution definitions built/provided by this module.
      Specified by:
        `getContributionDefs` in interface `ModuleDef`

    - #### getLoggerName

          public java.lang.String getLoggerName()

      Description copied from interface: `ModuleDef`
      Returns the name used to create a `Logger` instance. This is typically the builder class name.
      Specified by:
        `getLoggerName` in interface `ModuleDef`

    - #### getAdvisorDefs

          public java.util.Set<AdvisorDef> getAdvisorDefs()

      Description copied from interface: `ModuleDef2`
      Returns all the service advisor definitions built/provided by this module.
      Specified by:
        `getAdvisorDefs` in interface `ModuleDef2`

    - #### getStartups

          public java.util.Set<StartupDef> getStartups()

      Description copied from interface: `ModuleDef2`
      Methods marked with @Startup are converted into Runnable instances and assigned here.
      Specified by:
        `getStartups` in interface `ModuleDef2`