Class CommandParser
java.lang.Object
io.github.projectunified.craftcommand.processor.parser.CommandParser
Parser utility to convert compile-time annotated class elements into structured command models.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommandModelparse(TypeElement typeElement, ProcessingEnvironment env) Parses the given TypeElement if annotated with@Command.static MethodModelparseResolverMethod(ExecutableElement method) Parses a resolver or suggestion provider method into a model.
-
Method Details
-
parse
Parses the given TypeElement if annotated with@Command.- Parameters:
typeElement- the class elementenv- the processing environment- Returns:
- the parsed CommandModel, or
nullif parsing failed
-
parseResolverMethod
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
-