Replace priority with @Priority

The new @Priority annotation serves the exact same purpose as
@Event(priority = ...), but should be easier to read in complex handler
declarations. It has to be used in conjunction with the @Event
annotation, not instead of it.
This commit is contained in:
2021-02-15 12:06:33 +01:00
parent 3a6ebe9a19
commit 9b1c708514
7 changed files with 75 additions and 43 deletions

View File

@ -80,7 +80,7 @@ public class EventProcessor extends AbstractProcessor {
if (declaredElement.getKind() == ElementKind.INTERFACE
|| declaredElement.getModifiers().contains(Modifier.ABSTRACT))
warning(paramElement,
"Parameter should be instantiable or handler should include subtypes");
"Parameter should be instantiable or handler should use @Polymorphic");
}
// Check listener for interface implementation