public final class SFIToolkit extends Object
Modifier and Type | Field and Description |
---|---|
static int |
RC_GENERAL_ERROR |
static int |
RC_GENERAL_EXCEPTION |
static int |
RC_SYNTAX_ERROR |
Modifier and Type | Method and Description |
---|---|
static void |
callGC()
Call the Java garbage collector. Calling this method
should generally be avoided.
|
static void |
display(String s)
Output a string to the Stata Results window.
|
static void |
displayln(String s)
Output a string to the Stata Results window and automatically add
a line terminator at the end.
|
static void |
error(String s)
Output a string to the Stata Results window as an error.
|
static boolean |
errorDebug(String s)
Output a string to the Stata Results window as an error if
set debug on is enabled.
|
static void |
errorln(String s)
Output a string to the Stata Results window and automatically add
a line terminator at the end.
|
static String |
formatValue(double val,
String format)
Format a value using a Stata format.
|
static double |
getCallerVersion()
Get the version number of the calling program.
|
static String |
getTempFile()
Get a valid Stata temporary filename.
|
static String |
getTempName()
Get a valid Stata temporary name.
|
static String |
getWorkingDir()
Get the current Stata working directory.
|
static boolean |
isValidName(String s)
Check if a String is a valid Stata name.
|
static boolean |
isValidVariableName(String s)
Check if a String is a valid Stata variable name.
|
static int |
pollnow()
Request that Stata poll its GUI immediately.
|
static int |
pollstd()
Request that Stata poll its GUI at the standard interval.
|
static String |
stackTraceToString(Exception e)
Convert the stack trace from an
Exception to a String. |
public static final int RC_GENERAL_ERROR
public static final int RC_GENERAL_EXCEPTION
public static final int RC_SYNTAX_ERROR
public static void callGC()
public static void display(String s)
s
- The string to output.public static void displayln(String s)
s
- The string to output.public static void error(String s)
s
- The string to output.public static boolean errorDebug(String s)
s
- The string to output.public static void errorln(String s)
s
- The string to output.public static String formatValue(double val, String format)
val
- The value to format.format
- A valid Stata format.public static double getCallerVersion()
public static String getTempFile()
public static String getTempName()
public static String getWorkingDir()
public static boolean isValidName(String s)
s
- Name to test.public static boolean isValidVariableName(String s)
s
- Name to test.public static int pollnow()
pollstd
should be used instead.public static int pollstd()