资 源 简 介
Cliche Command-Line Shell
Cliche is a small Java library enabling really simple creation of interactive command-line user interfaces.
It uses metadata and Java Reflection to determine which class methods should be exposed to end user and to provide info for user. Therefore all information related to specific command is kept in only one place: in annotations in method"s header. User don"t have to organize command loop, write complicated parsers/converters for primitive types, though he can implement custom converters when needed.
How simple? So simple:
```
package asg.cliche.sample;
import asg.cliche.Command;
import asg.cliche.ShellFactory;
import java.io.IOException;
public class HelloWorld {
@Command // One,
public String hello() {
return "Hello, World!";
}
@Command // two,
public int add(int a, int b) {
return a + b;
}
public static void main(String[] args) throws IOE