Class Discovery

java.lang.Object
dev.engine.core.Discovery

public final class Discovery extends Object
Central registry of all Discoverable classes across all modules.

On JVM, registries are loaded automatically from META-INF/services/dev.engine.core.DiscoveryRegistry resource files (written by the annotation processor). On TeaVM, the generated DiscoveryBootstrap adds registries via addRegistry(DiscoveryRegistry).

Initialization happens automatically on first use — no explicit call needed.

  • Method Details

    • addRegistry

      public static void addRegistry(DiscoveryRegistry registry)
      Adds a registry and runs its initialization.
    • allClasses

      public static List<Class<?>> allClasses()
      Returns all discoverable classes from all loaded registries.
    • ensureInitialized

      public static void ensureInitialized()
      Ensures registries are loaded. On JVM, scans resource files written by the annotation processor. Safe to call multiple times.