java.lang.Object
javax.annotation.processing.AbstractProcessor
tech.guilhermekaua.spigotboot.spigot.annotationprocessor.discovery.DiscoveryIndexProcessor
All Implemented Interfaces:
Processor

@SupportedAnnotationTypes("*") @SupportedSourceVersion(RELEASE_8) public class DiscoveryIndexProcessor extends AbstractProcessor
Generates a compile-time discovery index covering every class the spigot-boot runtime would otherwise discover by classpath scanning. For each compilation unit that contains at least one indexable class, the processor emits:
  • A source file tech.guilhermekaua.spigotboot.generated.DiscoveryIndex_<hash> implementing DiscoveryIndex. The category map is built by resolving each discovered class by name through DiscoveryIndexSupport, so a class whose supertype comes from an absent optional dependency is skipped instead of crashing the whole index. The .class literals the Maven Shade Plugin's reachability analyzer needs (to keep discovered classes when minimizeJar is enabled) are emitted in a never-invoked keepReachable() method, so they live in the bytecode without being linked at runtime.
  • An empty marker resource at META-INF/spigot-boot/discovery/<GeneratedClassFQCN> so DiscoveryIndexReader can locate the generated class at runtime.

Categories are not hardcoded. The processor discovers them dynamically by reading @SpigotBootDiscoveryCategory meta-annotations on annotations and supertypes reachable from the compile classpath, so any third-party module can ship its own discovery rules without modifying this processor.