From 49560c13b8d2946632517fb4195688afc8fb0409 Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Tue, 5 Jan 2016 15:31:31 +0200 Subject: [PATCH] Back to extensions.idx storage (maybe temporary) because it's more tested --- .../ExtensionAnnotationProcessor.java | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/processor/ExtensionAnnotationProcessor.java b/pf4j/src/main/java/ro/fortsoft/pf4j/processor/ExtensionAnnotationProcessor.java index 60508be..881c05f 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/processor/ExtensionAnnotationProcessor.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/processor/ExtensionAnnotationProcessor.java @@ -50,8 +50,8 @@ public class ExtensionAnnotationProcessor extends AbstractProcessor { public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); -// storage = new LegacyExtensionStorage(this); - storage = new ServiceProviderExtensionStorage(this); + storage = new LegacyExtensionStorage(this); +// storage = new ServiceProviderExtensionStorage(this); } @Override @@ -185,31 +185,10 @@ public class ExtensionAnnotationProcessor extends AbstractProcessor { return extensionPointElements; } - /* - private boolean isObject(TypeMirror typeMirror) { - if (typeMirror instanceof DeclaredType) { - DeclaredType declaredType = (DeclaredType) typeMirror; - return ((TypeElement) declaredType.asElement()).getQualifiedName().toString().equals("java.lang.Object"); - } - - return false; - } - */ - private boolean isExtension(TypeMirror typeMirror) { return processingEnv.getTypeUtils().isAssignable(typeMirror, getExtensionPointType()); } - /* - private boolean isExtensionPoint(TypeMirror typeMirror) { - if (typeMirror instanceof DeclaredType) { - DeclaredType declaredType = (DeclaredType) typeMirror; - return ((TypeElement) declaredType.asElement()).equals(getExtensionPointType()); - } - - return false; - } - */ private TypeMirror getExtensionPointType() { return processingEnv.getElementUtils().getTypeElement(ExtensionPoint.class.getName()).asType();