Class CommandParserFactory

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

public final class CommandParserFactory extends Object
Creates the parser used by a processor round.

This is the annotation-reading half of the pipeline. It never emits code, so it can be used and tested independently of the generator.

  • Constructor Details

    • CommandParserFactory

      public CommandParserFactory(ProcessingEnvironment processingEnvironment)
      Creates the parser factory for one processing session.
      Parameters:
      processingEnvironment - the annotation processing environment
  • Method Details

    • parse

      public CommandModel parse(TypeElement typeElement)
      Parses a class annotated with @Command.
      Parameters:
      typeElement - the command class
      Returns:
      the command model, or null when the class cannot be parsed