Annotation Interface SpigotBootDiscoveryCategory


@Retention(CLASS) @Target(TYPE) public @interface SpigotBootDiscoveryCategory
Marks an annotation or type as the root of a DiscoveryIndex category. Downstream modules apply this meta-annotation to their own annotations or supertypes to extend discovery without modifying the annotation processor.

Example: classify anything implementing a community module's repository interface.


 @SpigotBootDiscoveryCategory(value = "my-plugin.repository", kind = Kind.SUBTYPE)
 public interface CommunityRepository<T, ID> { ... }
 

Example: classify anything annotated with a custom stereotype.


 @SpigotBootDiscoveryCategory(value = "my-plugin.handler", kind = Kind.ANNOTATION)
 public @interface MyHandler { }
 

At runtime, query the reader with the same category name:


 reader.classesInCategory("my-plugin.repository", basePackage);
 

RetentionPolicy.CLASS retention is used so the annotation processor can read this meta-annotation from compiled dependency jars, but the runtime doesn't pay the cost of loading it into reflective metadata.