Uses of Class
io.github.projectunified.craftcommand.processor.model.MethodModel
Packages that use MethodModel
Package
Description
Base annotation processor for CraftCommand.
SPI interfaces for extending the annotation processor.
Processor model classes that represent command metadata at compile time.
Paper-specific annotation processor for CraftCommand.
-
Uses of MethodModel in io.github.projectunified.craftcommand.processor
Methods in io.github.projectunified.craftcommand.processor with parameters of type MethodModelModifier and TypeMethodDescriptionprotected 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 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) booleanBaseCommandProcessor.firstParamIsSender(ExecutableElement resolverMethod, MethodModel commandMethod) Checks if the first parameter of a method is a sender parameter, considering the command method's sender type.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).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.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 intBaseCommandProcessor.getLocalResolverMaxWidth(ExecutableElement resolverMethod, MethodModel commandMethod) protected intBaseCommandProcessor.getLocalResolverMinWidth(ExecutableElement resolverMethod, MethodModel commandMethod) protected StringBaseCommandProcessor.getParameterSuggestionMethodName(CommandModel classModel, MethodModel method, int index) protected StringBaseCommandProcessor.getResolverParamSuggestionMethodName(CommandModel classModel, MethodModel method, String resolverName, int index) 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.booleanBaseCommandProcessor.isSenderParam(com.palantir.javapoet.TypeName typeName, MethodModel method) Checks if a type is any sender tier: command's sender type, base sender type, or platform sender type. -
Uses of MethodModel in io.github.projectunified.craftcommand.processor.extension
Methods in io.github.projectunified.craftcommand.processor.extension with parameters of type MethodModelModifier and TypeMethodDescriptionvoidMethodAnnotationHandler.handle(A annotation, MethodModel method, String instanceExpr, String senderVar, com.palantir.javapoet.MethodSpec.Builder methodSpec) Injects custom code (e.g. permission/cooldown checks) into the generated method execution code block.voidCommandValidator.wrap(A annotation, MethodModel method, String instanceExpr, String senderVar, com.palantir.javapoet.MethodSpec.Builder methodSpec) Wraps the execution of the command method with validation or async logic. -
Uses of MethodModel in io.github.projectunified.craftcommand.processor.model
Methods in io.github.projectunified.craftcommand.processor.model that return MethodModelModifier and TypeMethodDescriptionCommandModel.getDefaultMethod()Gets the default execution method.CommandModel.getResolverMethod(String name) Gets a resolver method by name.Methods in io.github.projectunified.craftcommand.processor.model that return types with arguments of type MethodModelModifier and TypeMethodDescriptionCommandModel.getResolverMethods()Gets the resolver method models (from @Resolve annotations).CommandModel.getSubcommands()Gets the method-level subcommands.Constructors in io.github.projectunified.craftcommand.processor.model with parameters of type MethodModelModifierConstructorDescriptionCommandModel(com.palantir.javapoet.ClassName className, String packageName, String commandName, List<String> aliases, String description, MethodModel defaultMethod, List<MethodModel> subcommands, List<CommandModel> nestedSubcommands, TypeElement element, Map<String, MethodModel> resolverMethods) Constructor parameters in io.github.projectunified.craftcommand.processor.model with type arguments of type MethodModelModifierConstructorDescriptionCommandModel(com.palantir.javapoet.ClassName className, String packageName, String commandName, List<String> aliases, String description, MethodModel defaultMethod, List<MethodModel> subcommands, List<CommandModel> nestedSubcommands, TypeElement element, Map<String, MethodModel> resolverMethods) -
Uses of MethodModel in io.github.projectunified.craftcommand.processor.paper
Methods in io.github.projectunified.craftcommand.processor.paper with parameters of type MethodModelModifier and TypeMethodDescriptionvoidPaperExecutionSource.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)