Companion

object Companion

Properties

Link copied to clipboard
const val ARG_REGEX: String

Regex used to determine the dynamic args within a VitalCommand.Arg.

Link copied to clipboard

The replacement for all sequences matching ARG_REGEX.

Link copied to clipboard
const val SPACE_REGEX: String

Regex used to determine the splitting character for all VitalCommand.Args.

Link copied to clipboard

The replacement for all sequences matching SPACE_REGEX.

Link copied to clipboard
const val VARARG_REGEX: String

Regex used to determine the dynamic varargs within a VitalCommand.Arg.

Link copied to clipboard

The replacement for all sequences matching VARARG_REGEX.

Functions

Link copied to clipboard

Extracts the first non-InvocationTargetException from the given Throwable. This function will be used during exception handling to extract the actual exception that occurred.

Link copied to clipboard

Internal function used to get the ArgExceptionHandlerContext of the given method and commandSenderClass. The context will later be used during command execution to call the appropriate arg exception handler function.

Link copied to clipboard

Internal function used to get the ArgHandlerContext of the given method and commandSenderClass. The context will later be used during command execution to call the appropriate arg handler function.

Link copied to clipboard

Internal function used to get the GlobalExceptionHandlerContext of the given method, adviceInstance (The global exception handler class) and commandSenderClass. The context will later be used during command execution to call the appropriate global exception handler function.

Internal function to correctly sort all injectable function parameters for an arg exception handler and return them as an Array, so they can later be used to call their appropriate mapped arg exception handler function.

Link copied to clipboard

Internal function to correctly sort all injectable function parameters for an arg handler and return them as an Array, so they can later be used to call their appropriate mapped arg handler function.

Internal function to correctly sort all injectable function parameters for a global exception handler and return them as an Array, so they can later be used to call their appropriate mapped global exception handler function.

Link copied to clipboard

Internal function used to get all arg exception handler functions annotated with ArgExceptionHandler and map them to their appropriate Arg and specified Annotation. This function returns a Map of all mapped arg exception handlers and will later be used during command execution to correctly call arg exception handlers when an exception occurs during command execution.

Link copied to clipboard

Internal function used to get the internal arg handler context for all functions annotated with ArgHandler. This arg handler context will later be used during command execution to call the annotated arg handler function with the correct parameters.

Link copied to clipboard

Internal function used to Get all functions annotated with ArgHandler and map them to their given Arg.name as a Pattern. These mapped args are later used during command execution to find out which arg was actually executed by a command sender.