java.lang.Object
io.github.projectunified.craftcommand.processor.parser.CommandParser

public final class CommandParser extends Object
Parser utility to convert compile-time annotated class elements into structured command models.
  • Method Details

    • parse

      public static CommandModel parse(TypeElement typeElement, ProcessingEnvironment env)
      Parses the given TypeElement if annotated with @Command.
      Parameters:
      typeElement - the class element
      env - the processing environment
      Returns:
      the parsed CommandModel, or null if parsing failed
    • parseResolverMethod

      public static MethodModel parseResolverMethod(ExecutableElement method)
      Parses a resolver or suggestion provider method into a model.

      Annotation reads stay inside the parser: generators call this instead of inspecting annotations themselves.

      Parameters:
      method - the method element
      Returns:
      the method model