本文整理汇总了Java中asg.cliche.Shell类的典型用法代码示例。如果您正苦于以下问题:Java Shell类的具体用法?Java Shell怎么用?Java Shell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Shell类属于asg.cliche包,在下文中一共展示了Shell类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import asg.cliche.Shell; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
ImcShell imcShell = new ImcShell();
Shell shell = ShellFactory.createConsoleShell("?", "IMC Shell",
imcShell);
imcShell.setReference(shell);
if (args.length == 1 && new File(args[0]).canRead()) {
BufferedReader reader = new BufferedReader(new FileReader(new File(
args[0])));
String line;
while ((line = reader.readLine()) != null) {
if (line.startsWith("#") || line.trim().isEmpty())
continue;
shell.processLine(line);
}
reader.close();
return;
}
shell.setDisplayTime(true);
System.out.println("Using IMC v"
+ IMCDefinition.getInstance().getVersion() + " ("
+ ImcStringDefs.IMC_SHA
+ ").\nEnter ?help for usage information.");
shell.commandLoop();
}
示例2: AbstractHandler
import asg.cliche.Shell; //导入依赖的package包/类
public AbstractHandler(Shell shell) {
this.current = shell;
}
示例3: currentShell
import asg.cliche.Shell; //导入依赖的package包/类
public Shell currentShell() {
return current;
}
示例4: createConsoleShell
import asg.cliche.Shell; //导入依赖的package包/类
protected Shell createConsoleShell() {
return ShellFactory.createConsoleShell(mavenProperties.getArtifactId(), getAppName(), this);
}
示例5: cliSetShell
import asg.cliche.Shell; //导入依赖的package包/类
public void cliSetShell(Shell shell) {
this.shell = shell;
}
示例6: cliSetShell
import asg.cliche.Shell; //导入依赖的package包/类
@Override
public void cliSetShell(Shell theShell) {
this.theShell = theShell;
}
示例7: cliSetShell
import asg.cliche.Shell; //导入依赖的package包/类
public void cliSetShell(Shell theShell) {
this.theShell = theShell;
}
示例8: setReference
import asg.cliche.Shell; //导入依赖的package包/类
/**
* @param reference
* the reference to set
*/
public void setReference(Shell reference) {
this.reference = reference;
}