Skip to content

Commit

Permalink
Back to extensions.idx storage (maybe temporary) because it's more te…
Browse files Browse the repository at this point in the history
…sted
  • Loading branch information
decebals committed Jan 5, 2016
1 parent ec60800 commit 49560c1
Showing 1 changed file with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -185,31 +185,10 @@ private List<TypeElement> findExtensionPoints(TypeElement extensionElement) {
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();
Expand Down

0 comments on commit 49560c1

Please sign in to comment.