Class OnConfigReloadInvoker

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

public class OnConfigReloadInvoker extends Object
Invokes @OnConfigReload callback methods reflectively, isolating any failure so it never escapes a config reload listener.
  • Constructor Details

    • OnConfigReloadInvoker

      public OnConfigReloadInvoker(@NotNull @NotNull Logger logger)
      Creates the invoker.
      Parameters:
      logger - the plugin logger, not null
  • Method Details

    • invoke

      public void invoke(@NotNull @NotNull Object bean, @NotNull @NotNull Method method, @NotNull @NotNull Object[] args)
      Invokes the given callback. Exceptions thrown by the callback are logged, not rethrown.
      Parameters:
      bean - the bean instance to invoke on, not null
      method - the callback method, not null
      args - the arguments to pass, not null (may be empty)