Annotation Interface IsCancelled


@Target(METHOD) @Retention(RUNTIME) public @interface IsCancelled
Filters out events which do not match the specified cancellation state (represented by a Tristate). If the state is set to undefined then the listener will be called regardless of the cancellation state.

If this annotation is not present then the behavior is as normal, which is to say that the listener is only called if the event is not cancelled.

The event type of the annotated event listener MUST be cancellable (eg. must extend Cancellable).

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Gets the required cancellation state of the event for the annotated listener to be called.
  • Element Details

    • value

      Tristate value
      Gets the required cancellation state of the event for the annotated listener to be called.
      Returns:
      The cancellation state
      Default:
      TRUE