Interface OrphanCommand


public interface OrphanCommand
Represents a command that has no parent known at compile-time. Classes that wish to set the command path at runtime should implement this interface.

Example implementation:


 public class Foo implements OrphanCommand {

     @Subcommand("bar")
     public void bar(CommandActor actor) {
         actor.reply("Executed as 'foo bar'!");
     }
 }
 
 
Register as:
 
 CommandHandler handler = ...;
 handler.register(Orphans.path("foo").handler(new Foo()));
 
See Also: