Annotation Interface FeatureListener


@Retention(RUNTIME) @Target(METHOD) @Repeatable(List.class) public @interface FeatureListener
Marks a method as a listener for one or more FeatureEvents fired by a specific feature.

The target feature can be specified either directly via feature() or by matching a combination of group() and identifier(). This annotation is repeatable, allowing a single method to listen for events from multiple features.

Annotated methods must be declared in classes registered via FeatureListenerRegistry.register(Object).

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Container annotation for repeatable FeatureListener declarations on a single method.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The lifecycle events this listener should respond to.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The specific feature class to listen to.
    The group of the target feature.
    The identifier of the target feature.
  • Element Details

    • feature

      Class<?> feature
      The specific feature class to listen to. Takes precedence over group() and identifier() when set to a class other than the default Feature.
      Returns:
      the feature class to listen to
      Default:
      ovh.mythmc.gestalt.annotations.Feature.class
    • group

      String group
      The group of the target feature. Used together with identifier() when feature() is not explicitly set.
      Returns:
      the feature group
      Default:
      ""
    • identifier

      String identifier
      The identifier of the target feature. Used together with group() when feature() is not explicitly set.
      Returns:
      the feature identifier
      Default:
      ""
    • events

      FeatureEvent[] events
      The lifecycle events this listener should respond to.
      Returns:
      the array of events to listen for