Annotation Type ListeningMethod


@Retention(RUNTIME) @Target(METHOD) public @interface ListeningMethod
Placed on methods to indicate it is intended they listen to an event.

The target method must be public and return void. The method cannot declare checked exceptions, it cannot be static, and it cannot be an abstract or default method.

A listening method must ordinarily have a single parameter whose type is that of the event listened to. If it is desired to be an asynchronous listener, it should accept two parameters; first, the event, second, a EventFireController.

Event classes must not be array types, primitive types, or Object. The event type declared by the method must be public and unconditionally exported.
Author:
A248
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    byte
    The priority at which to listen.
  • Element Details

    • priority

      byte priority
      The priority at which to listen. Lower priorities are called first. See EventBus for more information
      Returns:
      the listening priority
      Default:
      (byte)0x00