@AutoService(value=javax.annotation.processing.Processor.class) public final class GlideAnnotationProcessor extends AbstractProcessor
This processor discovers all
LibraryGlideModule implementations that are
GlideModule. Any implementations missing the
annotation will be ignored.
This processor also discovers all
Multiple classes are generated by this processor:
LibraryGlideModules - A GlideIndexer class in a specific package that will later be used by the processor to discover all
AppGlideModules - A single
GeneratedAppGlideModule) that calls all
LibraryGlideModules and the original
AppGlideModulein the correct order when Glide is initialized.
RequestOptionsimplementation that contains static versions of all builder methods in the base class and both static and instance versions of methods in all
GlideExtensionannotated classes are annotated with
RequestManagerimplementation containing a generated method for each method annotated with
RequestManagerRetriever.RequestManagerFactoryimplementation that produces the generated
Glidelook-alike that implements all static methods in the
Glidesingleton and returns the generated
RequestManagerimplementation when appropriate.
AppGlideModule implementations must only be included in
applications, not in libraries. There must be exactly one
AppGlideModule implementation per
AppGlideModule class is
used as a signal that all modules have been found and that the final merged
GeneratedAppGlideModule impl can be created.
|Constructor and Description|
|Modifier and Type||Method and Description|
Each round we do the following: Find all AppGlideModules and save them to an instance variable (throw if > 1).
getCompletions, getSupportedOptions, isInitialized
public void init(ProcessingEnvironment processingEnvironment)
public SourceVersion getSupportedSourceVersion()
public boolean process(Set<? extends TypeElement> set, RoundEnvironment env)