Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
Expand All @@ -29,13 +28,19 @@
* needs no dependency on the runtime module.
*/
@SupportedAnnotationTypes(TaskHandlerProcessor.ANNOTATION)
@SupportedSourceVersion(SourceVersion.RELEASE_11)
public final class TaskHandlerProcessor extends AbstractProcessor {
static final String ANNOTATION = "org.byteveda.taskito.annotation.TaskHandler";
static final String RESOURCE = "org.byteveda.taskito.annotation.Resource";
static final String COMPRESSED = "org.byteveda.taskito.annotation.Compressed";
static final String ENCRYPTED = "org.byteveda.taskito.annotation.Encrypted";

// Accept whatever the compiler runs at, so building at -source 17+ doesn't warn
// that the processor caps out below it (structural read, version-agnostic).
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}

@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
TypeElement marker = processingEnv.getElementUtils().getTypeElement(ANNOTATION);
Expand Down