com.google.appengine.spi

## Class ServiceProviderProcessor

- java.lang.Object
- - javax.annotation.processing.AbstractProcessor
  - - com.google.appengine.spi.ServiceProviderProcessor

- All Implemented Interfaces:
    javax.annotation.processing.Processor

      @SupportedAnnotationTypes(value="com.google.appengine.spi.ServiceProvider")
      @SupportedSourceVersion(value=RELEASE_6)
      @SupportedOptions(value={"debug","verify"})
      public class ServiceProviderProcessor
      extends javax.annotation.processing.AbstractProcessor

  Processes `ServiceProvider` annotations and generates the service provider configuration files described in `ServiceLoader`.

  Processor Options:

  - debug - turns on debug statements

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceProviderProcessor()`

  - ### Method Summary

    Methods
    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

    - ### Methods inherited from class javax.annotation.processing.AbstractProcessor

      `getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, init`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ServiceProviderProcessor

          public ServiceProviderProcessor()

  - ### Method Detail

    - #### process

          public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
                        javax.annotation.processing.RoundEnvironment roundEnv)

      1. For each class annotated with @ServiceProvider
         - Verify the @ServiceProvider interface value is correct
         - Categorize the class by its ServiceProvider interface
      2. 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
      Specified by:
        `process` in interface `javax.annotation.processing.Processor`
      Specified by:
        `process` in class `javax.annotation.processing.AbstractProcessor`