Class ComponentCore

java.lang.Object
su.nightexpress.excellentclaims.api.core.ComponentCore
All Implemented Interfaces:
LifecycleComponent

@NullMarked public class ComponentCore extends Object implements LifecycleComponent
  • Constructor Details

    • ComponentCore

      public ComponentCore()
  • Method Details

    • isRegistered

      public boolean isRegistered(LifecycleComponent component)
    • register

      public void register(LifecycleComponent component)
    • reload

      public void reload()
      Specified by:
      reload in interface LifecycleComponent
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface LifecycleComponent
    • start

      public void start()
      Specified by:
      start in interface LifecycleComponent
    • getComponent

      public <T> T getComponent(Class<T> componentType)
      Retrieves a registered component by its exact class or implemented interface. The generic bound is rather than to allow looking up pure API interfaces that don't expose lifecycle methods.
    • component

      public <T> Optional<T> component(Class<T> componentType)
    • getComponents

      public List<LifecycleComponent> getComponents()