Package ovh.mythmc.gestalt.annotations
Annotation 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 ClassesModifier and TypeClassDescriptionstatic @interfaceContainer annotation for repeatableFeatureListenerdeclarations on a single method. -
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe lifecycle events this listener should respond to. -
Optional Element Summary
Optional Elements
-
Element Details
-
feature
Class<?> featureThe specific feature class to listen to. Takes precedence overgroup()andidentifier()when set to a class other than the defaultFeature.- Returns:
- the feature class to listen to
- Default:
ovh.mythmc.gestalt.annotations.Feature.class
-
group
String groupThe group of the target feature. Used together withidentifier()whenfeature()is not explicitly set.- Returns:
- the feature group
- Default:
""
-
identifier
String identifierThe identifier of the target feature. Used together withgroup()whenfeature()is not explicitly set.- Returns:
- the feature identifier
- Default:
""
-
events
FeatureEvent[] eventsThe lifecycle events this listener should respond to.- Returns:
- the array of events to listen for
-