nextCommandBody
Retrieves the body of the next command and asserts it is of the specified type.
Return
The body of the next command cast to the expected type.
Parameters
The expected type of the command body.
The KClass of the expected command body type.
Throws
If no next command exists or the command type doesn't match.
Retrieves the body of the next command and asserts it is of the specified type (Java Class version).
This is a convenience overload that accepts a Java Class instance.
Return
The body of the next command cast to the expected type.
Parameters
The expected type of the command body.
The Class of the expected command body type.
Throws
If no next command exists or the command type doesn't match.
Retrieves the body of the next command with reified type checking.
This inline function uses reified generics to automatically infer the command type.
Return
The body of the next command cast to the expected type.
Parameters
The expected type of the command body (inferred).
Throws
If no next command exists or the command type doesn't match.