public class CommandHandlerVerifier extends Object
CommandHandlerVerifier class is a helper class that makes sure that a
CommandHandler is coded properly such that its string-based command type matches the
string-based type of the Java Command class that the handler is typed with.| Constructor and Description |
|---|
CommandHandlerVerifier() |
| Modifier and Type | Method and Description |
|---|---|
static void |
verifyCommandHandlerCompatibility(CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse> commandHandler)
|
public static void verifyCommandHandlerCompatibility(CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse> commandHandler) throws IllegalStateException
commandHandler is associated with a concrete Command
class that is implemented with the exact same string command type identifier as the
commandHandler type safe concrete Command implementation.
If incompatibility is found, IllegalStateException is thrown.
Calling this method prevents CommandHandler/Command pair that are liked by
Java type to produce inconsistent string-based type identifiers.
commandHandler - CommandHandler to verify for correct Command type
compatibility.IllegalStateException - if commandHandler is found to command type
incompatibility.Copyright © 2018. All rights reserved.