Uses of Record Class
io.github.projectunified.craftcommand.processor.model.ParameterModel
Packages that use ParameterModel
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.
-
Uses of ParameterModel in io.github.projectunified.craftcommand.processor.extension
Methods in io.github.projectunified.craftcommand.processor.extension with parameters of type ParameterModelModifier and TypeMethodDescriptionvoidParameterAnnotationHandler.handle(A annotation, ParameterModel parameter, String varName, String instanceExpr, String senderVar, com.palantir.javapoet.MethodSpec.Builder methodSpec) Injects custom code (e.g. validation) into the generated method execution code block. -
Uses of ParameterModel in io.github.projectunified.craftcommand.processor.generator
Methods in io.github.projectunified.craftcommand.processor.generator with parameters of type ParameterModelModifier and TypeMethodDescriptionstatic StringLocalNames.declaredName(ParameterModel parameter) The identifier a parameter was declared with in the command class.voidBaseCommandGenerator.generateSenderResolution(com.palantir.javapoet.MethodSpec.Builder spec, CommandModel rootModel, ParameterModel senderParam, com.palantir.javapoet.TypeName senderType, String senderVar) Emits the resolution of the command sender: a named@Resolvemethod, a registered sender resolver, or a platform cast.protected StringBaseCommandGenerator.getResolverParamSuggestionMethodName(CommandModel classModel, ParameterModel parameter) voidBaseCommandGenerator.runParameterAnnotationHandlers(ParameterModel param, String varName, String instanceExpr, String senderVar, com.palantir.javapoet.MethodSpec.Builder methodSpec) Runs the SPI parameter handlers of a resolved parameter. -
Uses of ParameterModel in io.github.projectunified.craftcommand.processor.model
Methods in io.github.projectunified.craftcommand.processor.model that return ParameterModelModifier and TypeMethodDescriptionParameterModel.asOptional(String inheritedDefault) Creates an optional copy of this parameter using the default value of a parent parameter.static 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.MethodModel.senderParameter()Returns the value of thesenderParameterrecord component.Creates a copy of this parameter using the Java identifier as its name.Methods in io.github.projectunified.craftcommand.processor.model that return types with arguments of type ParameterModelModifier and TypeMethodDescriptionMethodModel.parameters()Returns the value of theparametersrecord component.Constructors in io.github.projectunified.craftcommand.processor.model with parameters of type ParameterModelModifierConstructorDescriptionMethodModel(String methodName, String subcommandName, List<String> aliases, String description, ParameterModel senderParameter, List<ParameterModel> parameters, boolean isDefault, ExecutableElement element) Creates an instance of aMethodModelrecord class. -
Uses of ParameterModel in io.github.projectunified.craftcommand.validation.processor.extension
Methods in io.github.projectunified.craftcommand.validation.processor.extension with parameters of type ParameterModelModifier and TypeMethodDescriptionvoidMaxHandler.handle(Max annotation, ParameterModel parameter, String varName, String instanceExpr, String senderVar, com.palantir.javapoet.MethodSpec.Builder methodSpec) voidMinHandler.handle(Min annotation, ParameterModel parameter, String varName, String instanceExpr, String senderVar, com.palantir.javapoet.MethodSpec.Builder methodSpec) voidValidateWithHandler.handle(ValidateWith annotation, ParameterModel parameter, String varName, String instanceExpr, String senderVar, com.palantir.javapoet.MethodSpec.Builder methodSpec)