Class CommandRegistration

java.lang.Object
cz.zcu.fav.kiv.mjakubas.saf.command.CommandRegistration

public class CommandRegistration extends Object
Defines a method for registering all possible classes with command handlers.
  • Constructor Details

    • CommandRegistration

      public CommandRegistration(@NotNull @NotNull Properties properties)
      Instantiates new registrator with Properties containing all possible command flags.
      Parameters:
      properties - Properties with all possible command flags.
  • Method Details

    • registerClassCommands

      public void registerClassCommands(@NotNull @NotNull Object commandsClass) throws TokenException
      Registers all handlers of a specific Class. Handler is recognized by CommandHandler annotation.
      Parameters:
      commandsClass - Class containing command handlers
      Throws:
      TokenException - if command tokenization fails
    • getCommandsMap

      public Map<Object,Map<String,List<Token>>> getCommandsMap()
      Returs Map with all registered command handlers
      Returns:
      Map with all registered command handlers