Uses of Record Class
io.github.projectunified.craftcommand.processor.model.MethodModel
Packages that use MethodModel
Package
Description
SPI interfaces for extending the annotation processor.
Code generation half of 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.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. -
Uses of MethodModel in io.github.projectunified.craftcommand.processor.generator
Methods in io.github.projectunified.craftcommand.processor.generator with parameters of type MethodModelModifier and TypeMethodDescriptionbooleanBaseCommandGenerator.firstParamIsSender(ExecutableElement resolverMethod, MethodModel commandMethod) voidBaseCommandGenerator.generateResolverInvocation(com.palantir.javapoet.MethodSpec.Builder methodSpec, MethodModel resolverModel, CommandModel rootModel, com.palantir.javapoet.TypeName pTypeName, String varName, com.palantir.javapoet.CodeBlock senderExpr, List<String> resolverArgVarNames, boolean includeSender) Emits the call to a resolver method that produces a parameter value.intBaseCommandGenerator.getLocalResolverMaxWidth(MethodModel resolverModel, MethodModel commandMethod) intBaseCommandGenerator.getLocalResolverMinWidth(MethodModel resolverModel, MethodModel commandMethod) protected StringBaseCommandGenerator.getParameterSuggestionMethodName(CommandModel classModel, MethodModel method, int index) BaseCommandGenerator.getResolverInstanceExpr(MethodModel resolver, CommandModel rootModel) booleanBaseCommandGenerator.isSenderParam(com.palantir.javapoet.TypeName typeName, MethodModel method) -
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.ParameterModel.resolverMethod()Returns the value of theresolverMethodrecord component.ParameterModel.suggestMethod()Returns the value of thesuggestMethodrecord component.Methods in io.github.projectunified.craftcommand.processor.model that return types with arguments of type MethodModelModifier and TypeMethodDescriptionCommandModel.getSubcommands()Gets the method-level subcommands.Methods in io.github.projectunified.craftcommand.processor.model with parameters of type MethodModelModifier and TypeMethodDescriptionstatic ParameterModelParameterModel.sender(String name, TypeMirror type, String resolveName, MethodModel resolverMethod, VariableElement element) Creates the sender parameter, which has no command argument, default, or suggestion state.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) Creates a command model and indexes its nested subcommands.ParameterModel(String name, TypeMirror type, List<String> enumConstants, boolean greedy, boolean optional, String defaultValue, String suggestProvider, boolean suggestField, String resolveName, MethodModel resolverMethod, MethodModel suggestMethod, VariableElement element) Creates an instance of aParameterModelrecord class. -
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.generateExecution(com.palantir.javapoet.MethodSpec.Builder methodSpec, CommandModel classModel, MethodModel method, String instanceExpr, CommandModel rootModel) Emits the execution body for one method.