public class JShell extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APP_VERSION |
static String |
ENV_HOME |
static String |
ENV_PATH |
protected JShellContext |
rootContext |
| Constructor and Description |
|---|
JShell() |
JShell(net.thevpc.nuts.NutsApplicationContext appContext)
args are inherited from app context
|
JShell(net.thevpc.nuts.NutsApplicationContext appContext,
String[] args) |
JShell(net.thevpc.nuts.NutsSession session,
net.thevpc.nuts.NutsId appId,
String[] args) |
JShell(net.thevpc.nuts.NutsSession session,
net.thevpc.nuts.NutsId appId,
String serviceName,
String[] args) |
JShell(net.thevpc.nuts.NutsSession session,
String[] args) |
JShell(String serviceName,
String[] args,
JShellOptionsParser shellOptionsParser,
JShellEvaluator evaluator,
JShellCommandTypeResolver commandTypeResolver,
JShellErrorHandler errorHandler,
JShellExternalExecutor externalExecutor,
JShellHistory history) |
public static final String APP_VERSION
public static final String ENV_PATH
public static final String ENV_HOME
protected JShellContext rootContext
public JShell(net.thevpc.nuts.NutsApplicationContext appContext)
appContext - appContextpublic JShell(net.thevpc.nuts.NutsApplicationContext appContext,
String[] args)
public JShell(net.thevpc.nuts.NutsSession session,
String[] args)
public JShell(net.thevpc.nuts.NutsSession session,
net.thevpc.nuts.NutsId appId,
String[] args)
public JShell(net.thevpc.nuts.NutsSession session,
net.thevpc.nuts.NutsId appId,
String serviceName,
String[] args)
public JShell()
public JShell(String serviceName, String[] args, JShellOptionsParser shellOptionsParser, JShellEvaluator evaluator, JShellCommandTypeResolver commandTypeResolver, JShellErrorHandler errorHandler, JShellExternalExecutor externalExecutor, JShellHistory history)
public void addVarListener(JShellVarListener listener)
public void removeVarListener(JShellVarListener listener)
public JShellVarListener[] getVarListeners()
public JShellEvaluator getEvaluator()
public void setEvaluator(JShellEvaluator evaluator)
public JShellCommandTypeResolver getCommandTypeResolver()
public void setCommandTypeResolver(JShellCommandTypeResolver whichResolver)
public JShellExternalExecutor getExternalExecutor()
public void setExternalExecutor(JShellExternalExecutor externalExecutor)
public JShellErrorHandler getErrorHandler()
public void setErrorHandler(JShellErrorHandler errorHandler)
public List<String> findFiles(String namePattern, boolean exact, String parent, net.thevpc.nuts.NutsSession session)
protected JShellContext createRootContext(String serviceName, String[] args)
public JShellContext createNewContext(JShellContext parentContext)
public JShellContext createNewContext(JShellContext ctx, String serviceName, String[] args)
public JShellContext createInlineContext(JShellContext ctx, String serviceName, String[] args)
public JShellCommandNode createCommandNode(String[] args)
public JShellContext getRootContext()
public void executeLine(String line, boolean storeResult, JShellContext context)
public int onResult(int r,
JShellContext context)
public int onResult(Throwable th, JShellContext context)
public int onResult(int errorCode,
Throwable th,
JShellContext context)
public int executeCommand(String[] command, JShellContext context)
public void addToHistory(String[] command)
public int executePreparedCommand(String[] command, boolean considerAliases, boolean considerBuiltins, boolean considerExternal, JShellContext context)
public void run()
protected String readInteractiveLine(JShellContext context)
protected void printHeader(net.thevpc.nuts.NutsPrintStream out)
protected void executeHelp(JShellContext context)
protected void executeVersion(JShellContext context)
protected void executeInteractive(JShellContext context)
protected void onQuit(JShellQuitException quitException)
public int executeServiceFile(JShellContext context, boolean ignoreIfNotFound)
public int executeScript(String text, JShellContext context)
public int evalNode(JShellCommandNode node, JShellContext context)
public int safeEval(JShellCommandNode n, JShellContext context)
protected String getPromptString(JShellContext context)
protected String getPromptString0(JShellContext context)
public void prepareContext(JShellContext context)
public JShellScript parseScript(InputStream stream)
public JShellScript parseScript(String scriptString)
public void traceExecution(Supplier<String> msg, JShellContext context)
public JShellOptions getOptions()
public JShellHistory getHistory()
public String getVersion()
public net.thevpc.nuts.NutsApplicationContext getAppContext()
public JShellContext createContext(JShellContext ctx, JShellNode root, JShellNode parent, JShellVariables env, String serviceName, String[] args)
Copyright © 2022 vpc open source initiative. All rights reserved.