Class AtmosphereAnnotationIndexProcessor
- All Implemented Interfaces:
Processor
Discovery normally reads .class files off the classpath. A GraalVM
image has none, so the scan returns nothing — and an empty result is
indistinguishable from an application that genuinely has no endpoints, which
is why this failed silently for six months rather than loudly on day one.
javac already knows every annotated type it compiles. Writing that
list to "META-INF/atmosphere/annotated-classes.txt" moves discovery to the one moment it cannot
fail, and does so for any build: Maven or Gradle, Spring Boot or Quarkus or a
bare servlet container. It needs no Spring AOT and no Quarkus augmentation,
which is the point — those covered two deployments and left the rest with
nothing.
The processor is registered in
META-INF/services/javax.annotation.processing.Processor, so
javac picks it up from the classpath automatically. Having
atmosphere-runtime as a dependency is the entire setup.
Every jar ships the index for the classes it contains, and the runtime
merges them — see AtmosphereAnnotationScanner. One shared file would
mean the last jar on the classpath silently hiding the others.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringWhere each jar records the annotated classes it contains.Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe annotations to index, taken from the framework's own list so this cannot drift from what the runtime looks for.booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedOptions, getSupportedSourceVersion, init, isInitialized
-
Field Details
-
INDEX_RESOURCE
Where each jar records the annotated classes it contains.- See Also:
-
-
Constructor Details
-
AtmosphereAnnotationIndexProcessor
public AtmosphereAnnotationIndexProcessor()
-
-
Method Details
-
getSupportedAnnotationTypes
The annotations to index, taken from the framework's own list so this cannot drift from what the runtime looks for.- Specified by:
getSupportedAnnotationTypesin interfaceProcessor- Overrides:
getSupportedAnnotationTypesin classAbstractProcessor
-
process
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-