org.apache.tapestry5.ioc.internal

## Class ModuleImpl

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

- All Implemented Interfaces:
    Module, ModuleBuilderSource

      public class ModuleImpl
      extends java.lang.Object
      implements Module

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModuleImpl(InternalRegistry registry, ServiceActivityTracker tracker, ModuleDef moduleDef, PlasticProxyFactory proxyFactory, org.slf4j.Logger logger)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `collectEagerLoadServices(java.util.Collection<EagerLoadServiceProxy> proxies)` Locates services with the `EagerLoad` annotation and generates proxies for them, then adds them to the proxies list for instantiation.
    `java.util.Set<DecoratorDef>` | `findMatchingDecoratorDefs(ServiceDef serviceDef)` Iterates over any decorator definitions defined by the module and returns those that apply to the provided service definition.
    `java.util.Set<AdvisorDef>` | `findMatchingServiceAdvisors(ServiceDef serviceDef)` Iterates over any advisor definitions defined by the module and returns those that apply to the provided service definition.
    `java.util.Collection<java.lang.String>` | `findServiceIdsForInterface(java.lang.Class serviceInterface)` Locates the ids of all services that implement the provided service interface, or whose service interface is assignable to the provided service interface (is a super-class or super-interface).
    `java.util.Set<ContributionDef2>` | `getContributorDefsForService(ServiceDef serviceDef)` Finds any contributions that are targeted at the indicated service.
    `java.lang.String` | `getLoggerName()` Returns the name used to obtain a logger for the module.
    `java.lang.Object` | `getModuleBuilder()` Returns the instantiated version of the Tapestry IoC module class.
    `<T> T` | `getService(java.lang.String serviceId, java.lang.Class<T> serviceInterface)` Locates a service given a service id and the corresponding service interface type.
    `ServiceDef3` | `getServiceDef(java.lang.String serviceId)` Returns the service definition for the given service id.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ModuleImpl

          public ModuleImpl(InternalRegistry registry,
                            ServiceActivityTracker tracker,
                            ModuleDef moduleDef,
                            PlasticProxyFactory proxyFactory,
                            org.slf4j.Logger logger)

  - ### Method Detail

    - #### getService

          public <T> T getService(java.lang.String serviceId,
                                  java.lang.Class<T> serviceInterface)

      Description copied from interface: `Module`
      Locates a service given a service id and the corresponding service interface type.
      Specified by:
        `getService` in interface `Module`
      Parameters:
        `serviceId` - identifies the service to access
        `serviceInterface` - the interface the service implements
      Returns:
        the service's proxy

    - #### findMatchingDecoratorDefs

          public java.util.Set<DecoratorDef> findMatchingDecoratorDefs(ServiceDef serviceDef)

      Description copied from interface: `Module`
      Iterates over any decorator definitions defined by the module and returns those that apply to the provided service definition.
      Specified by:
        `findMatchingDecoratorDefs` in interface `Module`
      Parameters:
        `serviceDef` - for which decorators are being assembled
      Returns:
        set of decorators, possibly empty (but not null)

    - #### findMatchingServiceAdvisors

          public java.util.Set<AdvisorDef> findMatchingServiceAdvisors(ServiceDef serviceDef)

      Description copied from interface: `Module`
      Iterates over any advisor definitions defined by the module and returns those that apply to the provided service definition.
      Specified by:
        `findMatchingServiceAdvisors` in interface `Module`
      Parameters:
        `serviceDef` - for which advisors are being assembled
      Returns:
        set of advisors, possibly empty but not null

    - #### findServiceIdsForInterface

          public java.util.Collection<java.lang.String> findServiceIdsForInterface(java.lang.Class serviceInterface)

      Description copied from interface: `Module`
      Locates the ids of all services that implement the provided service interface, or whose service interface is assignable to the provided service interface (is a super-class or super-interface).
      Specified by:
        `findServiceIdsForInterface` in interface `Module`
      Parameters:
        `serviceInterface` - the interface to search for
      Returns:
        a collection of service ids

    - #### collectEagerLoadServices

          public void collectEagerLoadServices(java.util.Collection<EagerLoadServiceProxy> proxies)

      Description copied from interface: `Module`
      Locates services with the `EagerLoad` annotation and generates proxies for them, then adds them to the proxies list for instantiation.
      Specified by:
        `collectEagerLoadServices` in interface `Module`
      Parameters:
        `proxies` - collection of proxies to which any eager load services in the module should be added

    - #### getModuleBuilder

          public java.lang.Object getModuleBuilder()

      Description copied from interface: `ModuleBuilderSource`
      Returns the instantiated version of the Tapestry IoC module class.
      Specified by:
        `getModuleBuilder` in interface `ModuleBuilderSource`

    - #### getContributorDefsForService

          public java.util.Set<ContributionDef2> getContributorDefsForService(ServiceDef serviceDef)

      Description copied from interface: `Module`
      Finds any contributions that are targeted at the indicated service.
      Specified by:
        `getContributorDefsForService` in interface `Module`

    - #### getServiceDef

          public ServiceDef3 getServiceDef(java.lang.String serviceId)

      Description copied from interface: `Module`
      Returns the service definition for the given service id.
      Specified by:
        `getServiceDef` in interface `Module`
      Parameters:
        `serviceId` - unique id for the service (caseless)
      Returns:
        the service definition or null

    - #### getLoggerName

          public java.lang.String getLoggerName()

      Description copied from interface: `Module`
      Returns the name used to obtain a logger for the module. Services within the module suffix this with a period and the service id.
      Specified by:
        `getLoggerName` in interface `Module`
      Returns:
        module logger name

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.