|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.util.getopt.GetOptSpec
com.ibm.jc.tools.JCShell
JCShell: JavaCard shell
This shell allows on-line interoperation with a JavaCard and the applets running on such a card. In addition to this interactive mode it is also possible to run script files containing these commands.
The JCShell can be used to test applet behavior and to run regression tests automatically. The shell is extensible to address custom behavior of applets.
| Nested Class Summary | |
static interface |
JCShell.InputHandler
|
static interface |
JCShell.ShellListener
ShellListener functionality. |
| Field Summary | |
static int |
ABBREVMATCH
|
static int |
ARG_QUOTES
|
static int |
ARG_VARS
|
static int |
DEF_SCOPE
|
static int |
EXACTMATCH
|
static int |
GLOBAL_SCOPE
|
static JCShell.InputHandler |
inputHandler
Shell input/output control |
static int |
LOCAL_SCOPE
|
static int |
NOMATCH
Type of matches for equalsCmd |
| Fields inherited from class com.ibm.util.getopt.GetOptSpec |
argEaters, indent, leftAligned, OK |
| Method Summary | |
static void |
blockTermIO()
|
static int |
checkChannel(java.lang.String[] argv)
Check if argv[0] is a channel selector. |
static void |
clearVariables()
|
static java.lang.String |
dateToString(int date)
Return a String representing a date. |
static void |
deprecated(java.lang.String msg)
Print info on deprecated shell features. |
static void |
error(java.lang.String msg)
Some error occurred. |
static boolean |
executeDefun(java.lang.Object[] defun,
java.util.Vector argv,
boolean noNewScope)
|
static boolean |
executeScript(java.lang.String name,
java.io.FileReader in,
java.util.Vector argv,
boolean noNewScope)
|
static void |
exit(int status,
java.lang.String message)
Exit shell with given status. |
static void |
flush()
Flush output. |
static java.lang.String |
formatStrings(java.lang.String[] strs,
int indent,
int maxWidth,
java.lang.String sep)
Return a string with the formatted listing of the specified algorithms An array { A, B, C, D, E, F, G } of algorithm names is display in the form: A C E G B D F |
static JCShellPlugin |
getAppletPlugin()
|
static java.lang.String |
getLastError()
get last error message or an empty String if no error occured |
static java.lang.String |
getLastResponse()
|
static java.io.PrintStream |
getOutputStream()
|
static java.lang.String |
getPrompt()
|
static java.lang.String[] |
getReturnValue()
get return value as String[] either String or ArrayValue Hex.toString(traceTerminal.getLastResponse()) |
static java.lang.Object |
getVariable(int scope,
java.lang.String name)
|
static java.lang.String |
getVariable(java.lang.String name)
|
static java.lang.String |
getVersion()
show current program version and build timestamp |
static boolean |
hasLastError()
indicates if command execution caused an error |
static java.util.Vector |
initialize(java.io.PrintStream cout,
java.lang.String[] argv)
Initialize with custom output stream used from main and also by JCOP Tools |
static java.util.Vector |
initialize(java.lang.String[] argv)
|
static void |
interactiveInput()
|
static boolean |
isRemoteConnected()
return true if a terminal is connected and this is a "RemoteJCTerminal" |
static boolean |
lineInput(java.lang.String line)
Process one line of input. |
static void |
main(java.lang.String[] argv)
|
static int |
matchStrings(java.lang.String arg,
java.lang.String spec)
Compare a string against some command specification. |
static java.lang.String |
pad(java.lang.String s,
int width,
boolean truncate)
Pad some string |
static JCTerminal |
popTerminalFilter()
Remove top most filter terminal. |
static void |
print(java.lang.String msg)
Print output. |
static void |
println(java.lang.String msg)
Print output. |
static void |
pushTerminalFilter(JCTerminal term)
Applied some terminal filter to currently open terminal. |
static java.lang.String |
releaseToString(int r)
Return a String representing release data. |
static void |
resetError()
|
static void |
revertChannels()
Revert to settings before checkChannel has been called. |
static void |
setChannels(int e)
Set enabled output channels. |
static void |
setClassLoader(java.lang.ClassLoader loader)
|
static void |
setReturnValue(java.lang.Object value)
Set return value - subject to $(..) evaluation. |
static void |
setShellListener(JCShell.ShellListener listener)
|
static void |
setVariable(int scope,
java.lang.String name,
java.lang.Object value)
|
static void |
setVariable(java.lang.String name,
java.lang.Object value)
|
static java.util.Vector |
splitIntoArgv(java.lang.String arg,
int offset,
boolean commandLine)
|
| Methods inherited from class com.ibm.util.getopt.GetOptSpec |
cancelDialog, checkCmdFile, checkConsistency, commandLine, exit, getArgv, getDescription, getName, init, isInconsistent, makeGetOptPanel, parse, parse, parseWithCmdFile, runDialog, usage, usageFor, writeCmdFile |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static JCShell.InputHandler inputHandler
public static final int ARG_QUOTES
public static final int ARG_VARS
public static final int GLOBAL_SCOPE
public static final int DEF_SCOPE
public static final int LOCAL_SCOPE
public static int NOMATCH
public static int ABBREVMATCH
public static int EXACTMATCH
| Method Detail |
public static java.util.Vector initialize(java.lang.String[] argv)
throws java.io.IOException
java.io.IOException
public static java.util.Vector initialize(java.io.PrintStream cout,
java.lang.String[] argv)
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] argv)
public static boolean executeScript(java.lang.String name,
java.io.FileReader in,
java.util.Vector argv,
boolean noNewScope)
public static boolean executeDefun(java.lang.Object[] defun,
java.util.Vector argv,
boolean noNewScope)
public static void interactiveInput()
public static java.lang.String getPrompt()
public static boolean isRemoteConnected()
public static java.lang.String getVersion()
public static boolean lineInput(java.lang.String line)
public static void pushTerminalFilter(JCTerminal term)
public static JCTerminal popTerminalFilter()
public static void blockTermIO()
public static java.util.Vector splitIntoArgv(java.lang.String arg,
int offset,
boolean commandLine)
public static java.lang.Object getVariable(int scope,
java.lang.String name)
public static void setVariable(int scope,
java.lang.String name,
java.lang.Object value)
public static void setVariable(java.lang.String name,
java.lang.Object value)
public static java.lang.String getVariable(java.lang.String name)
public static void clearVariables()
public static JCShellPlugin getAppletPlugin()
public static void setClassLoader(java.lang.ClassLoader loader)
public static void setShellListener(JCShell.ShellListener listener)
public static void exit(int status,
java.lang.String message)
public static void deprecated(java.lang.String msg)
public static void error(java.lang.String msg)
public static void setReturnValue(java.lang.Object value)
public static java.lang.String[] getReturnValue()
public static java.lang.String getLastResponse()
public static java.lang.String getLastError()
public static boolean hasLastError()
public static void resetError()
public static void setChannels(int e)
public static int checkChannel(java.lang.String[] argv)
public static void revertChannels()
public static java.io.PrintStream getOutputStream()
public static void println(java.lang.String msg)
public static void print(java.lang.String msg)
public static void flush()
public static java.lang.String pad(java.lang.String s,
int width,
boolean truncate)
s - String to padwidth - pad to this field length. Positive values pad on right side
with blanks. Negative values pad on the left side.truncate - if true truncate string to match field widthpublic static java.lang.String releaseToString(int r)
r - the least significant 16 bits contain the release datapublic static java.lang.String dateToString(int date)
date - the least significant 16 bits contain the date
public static int matchStrings(java.lang.String arg,
java.lang.String spec)
public static java.lang.String formatStrings(java.lang.String[] strs,
int indent,
int maxWidth,
java.lang.String sep)
A C E G B D F
strs - the list of stringsindent - each line starts with that many spacesmaxWidth - each line shall not be longer than thatsep - the string which separates columns of algorithms.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||