diff options
-rw-r--r-- | pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java b/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java index e8629bc..1ac0955 100644 --- a/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java +++ b/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java @@ -95,11 +95,13 @@ public class ExtensionAnnotationProcessor extends AbstractProcessor { for (Element element : roundEnv.getElementsAnnotatedWith(Extension.class)) { // check if @Extension is put on class and not on method or constructor if (!(element instanceof TypeElement)) { + error(element, "Put annotation only on classes (no methods, no fields)"); continue; } // check if class extends/implements an extension point if (!isExtension(element.asType())) { + error(element, "%s is not an extension (it doesn't implement ExtensionPoint)", element); continue; } |