首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 对于java应用程序非常简单的命令行外壳

对于java应用程序非常简单的命令行外壳

资 源 简 介

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
VIP VIP
0.195188s