Annotation Interface Discoverable


@Target(TYPE) @Retention(RUNTIME) public @interface Discoverable
Marks a class for compile-time discovery. The annotation processor generates a DiscoverableRegistry class in the same package that provides hard references to all discoverable classes, ensuring they survive TeaVM's dead code elimination.

Classes annotated with @NativeStruct are implicitly discoverable (the processor handles both annotations).

Usage: annotate classes whose existence needs to be known at runtime without relying on classpath scanning or Class.forName().