All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jbock.processor.JbockProcessor Maven / Gradle / Ivy

There is a newer version: 5.18
Show newest version
package net.jbock.processor;

import com.google.auto.common.BasicAnnotationProcessor;

import javax.lang.model.SourceVersion;
import java.util.List;

/**
 * This is jbock's annotation processor.
 * It defines "steps", which are like subprocessors,
 * each of which handles a subset of the jbock annotations.
 * Most validation, as well as the source code generation,
 * is handled in the {@link CommandProcessingStep}.
 * The other steps perform some additional validation.
 */
public final class JbockProcessor extends BasicAnnotationProcessor {

    @Override
    protected Iterable steps() {
        ProcessorComponent component = DaggerProcessorComponent.factory()
                .create(new ProcessorModule(processingEnv));
        return List.of(component.commandProcessingStep(),
                component.converterProcessingStep(),
                component.parameterMethodProcessingStep());
    }

    @Override
    public SourceVersion getSupportedSourceVersion() {
        return SourceVersion.latestSupported();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy