⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 help.java

📁 用command模式写的一个简单的java 程序
💻 JAVA
字号:
/*******************************************************************************  Filename    :help.java
*  Description :The help command displays help for FileSystemShell. If the user types*               help [command]*               help invokes that command's help method.
*
*  Author      :xunzy
*
*  History     :2004-02-16   Created******************************************************************************/import java.lang.reflect.Method;import java.io.*;import java.util.Vector;public class help implements Command {    public void execute(File currentDir, Vector args)         throws CommandException {                if (args.isEmpty())            help();        else {            String commandName = (String)args.firstElement();            Command command = FileSystemShell.loadCommand(commandName);            if (command != null)                command.help();            else                 throw new CommandException(new Exception(),                     "No help available for this command");        }    }        public void help() { System.out.print("Usage: help [command]"); }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -