Class AtmosphereAnnotationIndexProcessor

java.lang.Object
javax.annotation.processing.AbstractProcessor
org.atmosphere.nativeimage.AtmosphereAnnotationIndexProcessor
All Implemented Interfaces:
Processor

@SupportedSourceVersion(RELEASE_21) public class AtmosphereAnnotationIndexProcessor extends AbstractProcessor
Records Atmosphere-annotated classes at compile time, so they can be found in a native image where scanning for them is impossible.

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.