Posts
Showing posts from February 25, 2019
Java CommandLine Interface implementation
- Get link
- X
- Other Apps
0
$begingroup$
I wrote got a lot of mini apps. Each app has it's own InputHandler for Input from the keyboard. It's time to make a lib for that purpose - a CommandLineInterface . Can you review my code on Design OOP Clean Code Naming (my bad englisch leads to bad naming) Interface CommandLineInterpreter any class that implements this interface can be use the CommandLineInterface . M is the application, which implements the CommandLineInterpreter public interface CommandLineInterpreter<M> { Set<Command<M>> getCommands(); Response executeCommand(String identifier, List<String> parameter); } Class Command the Command is responible to map in command typed via CLI into an action (method-call) on your app. To execute the command the Class is generic on M (w...
N S0lQXo5,DlS3lfut0 j8Nn,C4yl H5kOM6geLj6E