abstractcommand.java
来自「RESIN 3.2 最新源码」· Java 代码 · 共 56 行
JAVA
56 行
package example;import com.caucho.util.L10N;import java.util.logging.Logger;import java.util.logging.Level;import java.io.IOException;/** * Abstract base class for commands. */abstract public class AbstractCommand { static protected final Logger log = Logger.getLogger(AbstractCommand.class.getName()); static final L10N L = new L10N(AbstractCommand.class); private String _error = null; public void init() { _error = null; } /** * If a parse error is encountered then the implementing class calls * setError(). */ abstract void parse(Parser p) throws IOException; /** * Perform the command. * * @return a String result to return to the client, or null if the * command does not produce a result. * If an error occurs then the implementing class calls setError(). */ abstract String act(Magic8Ball magic8ball); public boolean isError() { return _error != null; } public String getError() { return _error; } protected void setError(String error) { _error = error; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?