promptfactory.java
来自「大名鼎鼎的java动态脚本语言。已经通过了sun的认证」· Java 代码 · 共 32 行
JAVA
32 行
package org.codehaus.groovy.sandbox.ui;import java.io.InputStream;import java.io.PrintStream;/** * Factory to build a command line prompt. Should build the most featureful * prompt available. * <p/> * Currently readline prompt will be looked up dynamically, and defaults to * normal System.in prompt. */public class PromptFactory{ public static Prompt buildPrompt(InputStream in, PrintStream out, PrintStream err) { try { return (Prompt) Class.forName("org.codehaus.groovy.sandbox.ui.ReadlinePrompt").newInstance(); } catch (ClassNotFoundException e) { return new JavaPrompt(in, out, err); } catch (Exception e) { e.printStackTrace(); return new JavaPrompt(in, out, err); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?