java.lang.Object
io.github.projectunified.craftcommand.processor.model.CommandModel

public class CommandModel extends Object
Model representing a parsed command or subcommand class.
  • Constructor Details

  • Method Details

    • getClassName

      public com.palantir.javapoet.ClassName getClassName()
      Gets the ClassName of the command class.
      Returns:
      the class name
    • getPackageName

      public String getPackageName()
      Gets the package name of the command class.
      Returns:
      the package name
    • getCommandName

      public String getCommandName()
      Gets the primary name of the command.
      Returns:
      the command name
    • getAliases

      public List<String> getAliases()
      Gets the aliases of the command.
      Returns:
      the list of aliases
    • getDescription

      public String getDescription()
      Gets the command description.
      Returns:
      the description
    • getDefaultMethod

      public MethodModel getDefaultMethod()
      Gets the default execution method.
      Returns:
      the default method model, or null if none
    • getSubcommands

      public List<MethodModel> getSubcommands()
      Gets the method-level subcommands.
      Returns:
      the list of subcommands
    • getNestedSubcommands

      public List<CommandModel> getNestedSubcommands()
      Gets the nested class-level subcommands.
      Returns:
      the list of nested subcommands
    • getElement

      public TypeElement getElement()
      Gets the underlying Java TypeElement of this class.
      Returns:
      the type element
    • getResolverMethods

      public Map<String,MethodModel> getResolverMethods()
      Gets the resolver method models (from @Resolve annotations).
      Returns:
      map of resolver method name to MethodModel
    • getResolverMethod

      public MethodModel getResolverMethod(String name)
      Gets a resolver method by name.
      Parameters:
      name - the resolver method name
      Returns:
      the MethodModel, or null if not found