Class MethodModel
java.lang.Object
io.github.projectunified.craftcommand.processor.model.MethodModel
Model representing a command or subcommand method.
-
Constructor Summary
ConstructorsConstructorDescriptionMethodModel(String methodName, String subcommandName, List<String> aliases, String description, ParameterModel senderParameter, List<ParameterModel> parameters, boolean isDefault, ExecutableElement element) -
Method Summary
Modifier and TypeMethodDescriptionGets the subcommand aliases.Gets the subcommand description.Gets the underlying Java ExecutableElement.Gets the Java method name.Gets the list of argument parameters.Gets the sender parameter model.Gets the type of the sender parameter.Gets the subcommand name.booleanChecks if this method is the default action.
-
Constructor Details
-
MethodModel
public MethodModel(String methodName, String subcommandName, List<String> aliases, String description, ParameterModel senderParameter, List<ParameterModel> parameters, boolean isDefault, ExecutableElement element)
-
-
Method Details
-
getMethodName
Gets the Java method name.- Returns:
- the method name
-
getSubcommandName
Gets the subcommand name.- Returns:
- the subcommand name, or
null
-
getAliases
Gets the subcommand aliases.- Returns:
- the list of aliases
-
getDescription
Gets the subcommand description.- Returns:
- the description
-
getSenderType
Gets the type of the sender parameter.- Returns:
- the sender type mirror
-
getSenderParameter
Gets the sender parameter model.- Returns:
- the sender parameter model
-
getParameters
Gets the list of argument parameters.- Returns:
- the list of parameter models
-
isDefault
public boolean isDefault()Checks if this method is the default action.- Returns:
trueif default action
-
getElement
Gets the underlying Java ExecutableElement.- Returns:
- the executable element
-