Class OnConfigReloadBinder

java.lang.Object
tech.guilhermekaua.spigotboot.config.reload.OnConfigReloadBinder

public class OnConfigReloadBinder extends Object
Validates a single @OnConfigReload method and registers the reload listener(s) it implies on the DefaultConfigManager.
  • Constructor Details

    • OnConfigReloadBinder

      public OnConfigReloadBinder(@NotNull @NotNull DefaultConfigManager configManager, @NotNull @NotNull OnConfigReloadInvoker invoker)
      Creates the binder.
      Parameters:
      configManager - the config manager, not null
      invoker - the reflective invoker, not null
  • Method Details

    • bind

      public void bind(@NotNull @NotNull Object bean, @NotNull @NotNull Method method)
      Validates the method and registers reload listeners for every target config it declares.
      Parameters:
      bean - the owning bean instance, not null
      method - a method annotated with OnConfigReload, not null
      Throws:
      ConfigException - if the method signature or targets are invalid