Package org.apache.tapestry5.ioc.internal

## Class DecoratorDefImpl

- java.lang.Object
- - org.apache.tapestry5.ioc.internal.AbstractServiceInstrumenter
  - - org.apache.tapestry5.ioc.internal.DecoratorDefImpl

- All Implemented Interfaces:
    `DecoratorDef`, `DecoratorDef2`, `Markable`

      public class DecoratorDefImpl
      extends AbstractServiceInstrumenter
      implements DecoratorDef2

- - ### Field Summary

    - ### Fields inherited from class org.apache.tapestry5.ioc.internal.AbstractServiceInstrumenter

      `constraints, idMatcher, method, proxyFactory`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DecoratorDefImpl​(java.lang.reflect.Method decoratorMethod, java.lang.String[] patterns, java.lang.String[] constraints, PlasticProxyFactory proxyFactory, java.lang.String decoratorId, java.lang.Class serviceInterface, java.util.Set<java.lang.Class> markers)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ServiceDecorator` | `createDecorator​(ModuleBuilderSource moduleSource, ServiceResources resources)` | Creates an object that can perform the decoration (in the default case, by invoking the decorator method on the module class or instance.
    `java.lang.String` | `getDecoratorId()` | Returns the id of the decorator, which is derived from the decorator method name.

    - ### Methods inherited from class org.apache.tapestry5.ioc.internal.AbstractServiceInstrumenter

      `getConstraints, getMarkers, getServiceInterface, matches, toString`

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

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

    - ### Methods inherited from interface org.apache.tapestry5.ioc.def.DecoratorDef

      `getConstraints, matches`

    - ### Methods inherited from interface org.apache.tapestry5.ioc.Markable

      `getMarkers, getServiceInterface`

- - ### Constructor Detail

    - #### DecoratorDefImpl

          public DecoratorDefImpl​(java.lang.reflect.Method decoratorMethod,
                                  java.lang.String[] patterns,
                                  java.lang.String[] constraints,
                                  PlasticProxyFactory proxyFactory,
                                  java.lang.String decoratorId,
                                  java.lang.Class serviceInterface,
                                  java.util.Set<java.lang.Class> markers)

  - ### Method Detail

    - #### createDecorator

          public ServiceDecorator createDecorator​(ModuleBuilderSource moduleSource,
                                                  ServiceResources resources)

      Description copied from interface: `DecoratorDef`
      Creates an object that can perform the decoration (in the default case, by invoking the decorator method on the module class or instance.
      Specified by:
        `createDecorator` in interface `DecoratorDef`
      Parameters:
        `moduleSource` - access to the the module instance associated with the module containing the decorator (not necessarily the module containing the service being decorated)
        `resources` - the resources visible to the decorator (which may be in a different module than the service being decorated). Other resource properties (serviceId, serviceInterface, log, etc.) are for the service being decorated.

    - #### getDecoratorId

          public java.lang.String getDecoratorId()

      Description copied from interface: `DecoratorDef`
      Returns the id of the decorator, which is derived from the decorator method name.
      Specified by:
        `getDecoratorId` in interface `DecoratorDef`