@SupportedAnnotationTypes(value="com.google.appengine.spi.ServiceProvider")
@SupportedSourceVersion(value=RELEASE_6)
@SupportedOptions(value={"debug","verify"})
public class ServiceProviderProcessor
extends javax.annotation.processing.AbstractProcessor
ServiceProvider annotations and generates the service provider
configuration files described in ServiceLoader.
Processor Options:
| Constructor and Description |
|---|
ServiceProviderProcessor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
javax.annotation.processing.RoundEnvironment roundEnv)
For each class annotated with @ServiceProvider
Verify the @ServiceProvider interface value is correct
Categorize the class by its ServiceProvider interface
For each @ServiceProvider interface
Create a file named
META-INF/services/<interface>
For each @ServiceProvider annotated class for this interface
Create an entry in the file
|
public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
javax.annotation.processing.RoundEnvironment roundEnv)
META-INF/services/<interface>
process in interface javax.annotation.processing.Processorprocess in class javax.annotation.processing.AbstractProcessor