Uses of Class
io.github.projectunified.craftcommand.processor.model.CommandModel
Packages that use CommandModel
Package
Description
Base annotation processor for CraftCommand.
Bukkit-specific annotation processor for CraftCommand.
Processor model classes that represent command metadata at compile time.
Paper-specific annotation processor for CraftCommand.
Argument parsing utilities for the annotation processor.
Standalone-specific annotation processor for CraftCommand.
-
Uses of CommandModel in io.github.projectunified.craftcommand.processor
Methods in io.github.projectunified.craftcommand.processor that return CommandModelModifier and TypeMethodDescriptionBaseCommandProcessor.findModelForClass(CommandModel current, TypeElement targetClass) ResolverLookup.findModelForClass(CommandModel current, TypeElement targetClass) Walk the command tree to find theCommandModelwhose element equalstargetClass.Methods in io.github.projectunified.craftcommand.processor with parameters of type CommandModelModifier and TypeMethodDescriptionprotected voidBaseCommandProcessor.anchorAdditionalFields(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model) Phase 2: Add additional fields after instance and manager.protected voidBaseCommandProcessor.anchorAdditionalHelpers(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model) Phase 5: Add additional helper methods.protected voidBaseCommandProcessor.anchorBuildEntryMethods(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, TypeElement typeElement) Phase 4: Generate platform-specific entry methods (execute, tabComplete, getCommandNode, etc.).protected voidBaseCommandProcessor.anchorConstructorBottom(com.palantir.javapoet.MethodSpec.Builder constructorBuilder, CommandModel model) Phase 3 (bottom): Add platform-specific constructor statements at the end.protected voidBaseCommandProcessor.anchorConstructorTop(com.palantir.javapoet.MethodSpec.Builder constructorBuilder, CommandModel model) Phase 3 (top): Add platform-specific constructor statements at the beginning.protected voidBaseCommandProcessor.anchorExtraMethods(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model) Phase 7: Add extra methods after CommandInfoExposer (Brigadier tree, etc.).protected voidBaseCommandProcessor.buildAdditionalHelpers(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model) Generates additional platform-independent helper methods (like suggestBoolean and sender casting helpers).protected com.palantir.javapoet.CodeBlockBaseCommandProcessor.buildAliasesExpression(CommandModel model) protected voidBaseCommandProcessor.buildExecutionRouting(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel model, String argsVar, String instanceVar, CommandModel rootModel, String returnStatement) protected voidBaseCommandProcessor.buildLocalResolverParameter(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, ParameterModel p, com.palantir.javapoet.TypeName pTypeName, String varName, ExecutableElement localResolver, CommandModel rootModel, String senderVarName, String argsVar, String argIdxVar, boolean hasDynamic, int i) protected voidBaseCommandProcessor.buildMethodExecution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, String instanceVar, CommandModel rootModel, ExecutionSource source) protected voidBaseCommandProcessor.buildMethodExecution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, String argsVar, String instanceVar, CommandModel rootModel) protected com.palantir.javapoet.MethodSpecBaseCommandProcessor.buildParameterSuggestionHelper(CommandModel classModel, MethodModel method, ParameterModel p, int index, CommandModel rootModel) protected voidBaseCommandProcessor.buildParameterSuggestions(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, CommandModel rootModel) protected com.palantir.javapoet.MethodSpecBaseCommandProcessor.buildResolverParamSuggestionHelper(CommandModel classModel, MethodModel method, ParameterModel rp, String helperName, CommandModel rootModel) voidBaseCommandProcessor.buildSenderResolution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, String senderVarName, ParameterModel senderParam, com.palantir.javapoet.TypeName senderParamTypeName) protected voidBaseCommandProcessor.buildSubcommandSuggestionRouting(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, String argsVar) protected voidBaseCommandProcessor.buildSuggestionRouting(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel model, String argsVar, String instanceVar, CommandModel rootModel) protected voidBaseCommandProcessor.buildWrapperClass(CommandModel model, TypeElement typeElement) Generates the wrapper class using the template flow with anchor injection points.BaseCommandProcessor.findLocalResolver(CommandModel classModel, ParameterModel p, CommandModel rootModel) ResolverLookup.findLocalResolver(CommandModel classModel, ParameterModel p) Find a local@Resolvemethod for the given parameter.BaseCommandProcessor.findModelForClass(CommandModel current, TypeElement targetClass) ResolverLookup.findModelForClass(CommandModel current, TypeElement targetClass) Walk the command tree to find theCommandModelwhose element equalstargetClass.protected voidBaseCommandProcessor.generateExecuteMethodBody(com.palantir.javapoet.MethodSpec.Builder executeSpec, CommandModel model, String returnStatement) voidArrayExecutionSource.generateExecutionSetup(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel) voidExecutionSource.generateExecutionSetup(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel) Generates code for platform-specific execution setup or static checks (e.g. checking command length).protected voidBaseCommandProcessor.generateFieldsAndConstructorStatements(CommandModel model, com.palantir.javapoet.TypeSpec.Builder typeSpec, com.palantir.javapoet.MethodSpec.Builder constructor, String parentFieldName) voidArrayExecutionSource.generateParameterResolution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, ParameterModel p, String varName, String senderVarName, int paramIndex) voidExecutionSource.generateParameterResolution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, ParameterModel p, String varName, String senderVar, int paramIndex) Generates code to parse and resolve a specific command parameter.voidBaseCommandProcessor.generateResolverInvocation(com.palantir.javapoet.MethodSpec.Builder methodSpec, ExecutableElement localResolver, CommandModel classModel, CommandModel rootModel, com.palantir.javapoet.TypeName pTypeName, String varName, String senderVarName, List<String> resolverArgVarNames, boolean includeSender) Generates the common local resolver invocation code: null-check resolver instance, build method call with pre-resolved parameter variables, and assign the result.voidBaseCommandProcessor.generateResolverResolution(ExecutionSource executionSource, com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, MethodModel resolverModel, String varName, String senderVarName, ParameterModel parentParam, String rawSourceExpr) Unified resolver param resolution: resolves each non-sender param using the same code path, then invokes the resolver method.voidArrayExecutionSource.generateSenderResolution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, String senderVarName, ParameterModel senderParam, com.palantir.javapoet.TypeName senderParamTypeName) voidExecutionSource.generateSenderResolution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, String senderVarName, ParameterModel senderParam, com.palantir.javapoet.TypeName senderParamTypeName) Generates code to resolve and cast the command sender.protected voidBaseCommandProcessor.generateSubcommandClassExecutors(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, CommandModel rootModel) protected voidBaseCommandProcessor.generateUnknownSubcommandMessage(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel model) BaseCommandProcessor.getInstanceVarExpression(CommandModel classModel, CommandModel rootModel) protected StringBaseCommandProcessor.getParameterSuggestionMethodName(CommandModel classModel, MethodModel method, int index) BaseCommandProcessor.getResolverInstanceExpr(ExecutableElement resolver, CommandModel classModel, CommandModel rootModel) Returns the instance expression for calling a resolver method.protected StringBaseCommandProcessor.getResolverParamSuggestionMethodName(CommandModel classModel, MethodModel method, String resolverName, int index) protected StringBaseCommandProcessor.getSubcommandFieldName(CommandModel child) protected static StringBaseCommandProcessor.getSubcommandNames(CommandModel model) Utility method to format a list of all subcommand names defined in a command model.protected static StringBaseCommandProcessor.getUsage(MethodModel method, CommandModel classModel) Utility method to build the command usage syntax string for a command method, with support for flattening @Resolve resolver params. -
Uses of CommandModel in io.github.projectunified.craftcommand.processor.bukkit
Methods in io.github.projectunified.craftcommand.processor.bukkit with parameters of type CommandModelModifier and TypeMethodDescriptionprotected voidBukkitCommandProcessor.anchorAdditionalHelpers(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model) protected voidBukkitCommandProcessor.anchorBuildEntryMethods(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, TypeElement typeElement) protected voidBukkitCommandProcessor.anchorConstructorTop(com.palantir.javapoet.MethodSpec.Builder constructorBuilder, CommandModel model) static voidBukkitHelperMethods.generate(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model) Generate all needed helpers into the given TypeSpec, based on which types the command uses.protected voidBukkitCommandProcessor.generateUnknownSubcommandMessage(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel model) static booleanBukkitHelperMethods.hasParameterType(CommandModel model, String typeName) Check if any method in the command tree has a parameter of the given type name. -
Uses of CommandModel in io.github.projectunified.craftcommand.processor.model
Methods in io.github.projectunified.craftcommand.processor.model that return types with arguments of type CommandModelModifier and TypeMethodDescriptionCommandModel.getNestedSubcommands()Gets the nested class-level subcommands. -
Uses of CommandModel in io.github.projectunified.craftcommand.processor.paper
Methods in io.github.projectunified.craftcommand.processor.paper with parameters of type CommandModelModifier and TypeMethodDescriptionprotected voidPaperCommandProcessor.anchorBuildEntryMethods(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, TypeElement typeElement) protected voidPaperCommandProcessor.anchorExtraMethods(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model) protected voidPaperCommandProcessor.buildParameterSuggestions(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, CommandModel rootModel) voidPaperExecutionSource.generateExecutionSetup(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel) voidPaperExecutionSource.generateParameterResolution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, ParameterModel pm, String varName, String senderVarName, int paramIndex) voidPaperExecutionSource.generateSenderResolution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, CommandModel rootModel, String senderVarName, ParameterModel senderParam, com.palantir.javapoet.TypeName senderParamTypeName) protected voidPaperCommandProcessor.generateSubcommandClassExecutors(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, CommandModel rootModel) -
Uses of CommandModel in io.github.projectunified.craftcommand.processor.parser
Methods in io.github.projectunified.craftcommand.processor.parser that return CommandModelModifier and TypeMethodDescriptionstatic CommandModelCommandParser.parse(TypeElement typeElement, ProcessingEnvironment env) Parses the given TypeElement if annotated with@Command. -
Uses of CommandModel in io.github.projectunified.craftcommand.processor.standalone
Methods in io.github.projectunified.craftcommand.processor.standalone with parameters of type CommandModelModifier and TypeMethodDescriptionprotected voidStandaloneCommandProcessor.anchorBuildEntryMethods(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model, TypeElement typeElement)