Package org.apache.tapestry5.internal.transform

## Class OnEventWorker

- java.lang.Object
- - org.apache.tapestry5.internal.transform.OnEventWorker

- All Implemented Interfaces:
    `ComponentClassTransformWorker2`

      public class OnEventWorker
      extends Object
      implements ComponentClassTransformWorker2

  Provides implementations of the `Component.dispatchComponentEvent(org.apache.tapestry5.runtime.ComponentEvent)` method, based on `OnEvent` annotations and naming conventions.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OnEventWorker​(Request request, ValueEncoderSource valueEncoderSource, ComponentClassCache classCache, OperationTracker operationTracker, RestSupport restSupport)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `isRestEndpointEventHandlerMethod​(OnEvent onEvent, String methodName)` | Tells whether a method with a given name and possibly `OnEvent` annotation is a REST endpoint event handler method or not.
    `void` | `transform​(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model)` | Invoked to perform part of the transformation of the `PlasticClass`.

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

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

- - ### Constructor Detail

    - #### OnEventWorker

          public OnEventWorker​(Request request,
                               ValueEncoderSource valueEncoderSource,
                               ComponentClassCache classCache,
                               OperationTracker operationTracker,
                               RestSupport restSupport)

  - ### Method Detail

    - #### transform

          public void transform​(PlasticClass plasticClass,
                                TransformationSupport support,
                                MutableComponentModel model)

      Description copied from interface: `ComponentClassTransformWorker2`
      Invoked to perform part of the transformation of the `PlasticClass`.
      Specified by:
        `transform` in interface `ComponentClassTransformWorker2`
      Parameters:
        `plasticClass` - component class being transformed
        `support` - additional utilities needed during the transformation
        `model` - the model for the component being transformed

    - #### isRestEndpointEventHandlerMethod

          public static boolean isRestEndpointEventHandlerMethod​(OnEvent onEvent,
                                                                 String methodName)

      Tells whether a method with a given name and possibly `OnEvent` annotation is a REST endpoint event handler method or not.