Uses of Annotation Type
com.stata.sfi.Synchronized
Package
Description
The Stata Function Interface (SFI) provides the classes necessary for Java to
interact with core features of Stata.
Provides a set of utility classes for
extending the functionality of the Stata Function Interface (SFI).
-
Uses of Synchronized in com.stata.sfi
Modifier and TypeMethodDescriptionstatic int
Data.addVarByte
(String name) Add a variable of type byte to the current Stata dataset.static int
Deprecated.Add a variable of type byte to a data frame.int
Frame.addVarByte
(String varname) Add a variable of type byte to the frame.static int
Data.addVarDouble
(String name) Add a variable of type double to the current Stata dataset.static int
Deprecated.Add a variable of type double to a data frame.int
Frame.addVarDouble
(String varname) Add a variable of type double to the frame.static int
Data.addVarFloat
(String name) Add a variable of type float to the current Stata dataset.static int
Deprecated.Add a variable of type float to a data frame.int
Frame.addVarFloat
(String varname) Add a variable of type float to the frame.static int
Add a variable of type int to the current Stata dataset.static int
Deprecated.Add a variable of type int to a data frame.int
Add a variable of type int to the frame.static int
Data.addVarLong
(String name) Add a variable of type long to the current Stata dataset.static int
Deprecated.Add a variable of type long to a data frame.int
Frame.addVarLong
(String varname) Add a variable of type long to the frame.static int
Add a variable of type str to the current Stata dataset.static int
Deprecated.Add a variable of type str to a data frame.int
Add a variable of type str to the frame.static int
Data.addVarStrL
(String name) Add a variable of type strL to the current Stata dataset.static int
Deprecated.Add a variable of type strL to a data frame.int
Frame.addVarStrL
(String varname) Add a variable of type strL to the frame.static int
DataFrame.allocate
(String rname) Deprecated.Allocate a new data frame.static int
Data.allocateStrL
(StrLConnector sc, long size) Allocate a strL so that a buffer can be stored usingwriteBytes
; the contents of the strL will not be initialized.static int
Data.allocateStrL
(StrLConnector sc, long size, boolean binary) Allocate a strL so that a buffer can be stored usingwriteBytes
; the contents of the strL will not be initialized.static int
DataFrame.allocateStrL
(StrLConnector dsc, long size) Deprecated.Allocate a strL so that a buffer can be stored usingwriteBytes
; the contents of the strL will not be initialized.static int
DataFrame.allocateStrL
(StrLConnector dsc, long size, boolean binary) Deprecated.Allocate a strL so that a buffer can be stored usingwriteBytes
; the contents of the strL will not be initialized.int
Frame.allocateStrL
(StrLConnector dsc, long size) Allocate a strL so that a buffer can be stored usingwriteBytes
; the contents of the strL will not be initialized.int
Frame.allocateStrL
(StrLConnector dsc, long size, boolean binary) Allocate a strL so that a buffer can be stored usingwriteBytes
; the contents of the strL will not be initialized.static void
SFIToolkit.callGC()
Call the Java garbage collector. Calling this method should generally be avoided.int
Frame.changeToCWF()
Set theFrame
as the current working frame in Stata.void
StrLConnector.close()
Close the connection and release any resources.static Frame
Connect to an existing frame in Stata and return a newFrame
instance that can be used to access it.static int
Matrix.convertSymmetricToStd
(String name) Convert a symmetric matrix to a standard matrix.static Frame
Create a new frame in Stata and return a newFrame
instance that can be used to access it.static int
ValueLabel.createLabel
(String name) Create a new value-label name.static int
Matrix.createMatrix
(String name, int rows, int cols, double initialValue) Create a Stata matrix.static int
Matrix.createMatrix
(String name, int rows, int cols, double initialValue, boolean isSymmetric) Create a Stata matrix.static void
Display an object in the Stata Results window.static void
Display an object in the Stata Results window.static void
SFIToolkit.display
(Object o, DisplayMode mode) Display an object in the Stata Results window.static void
SFIToolkit.display
(Object o, DisplayMode mode, boolean asis) Display an object in the Stata Results window.static void
Display a string in the Stata Results window.static void
Display a string in the Stata Results window.static void
SFIToolkit.display
(String s, DisplayMode mode) Display a string in the Stata Results window.static void
SFIToolkit.display
(String s, DisplayMode mode, boolean asis) Display a string in the Stata Results window.static void
SFIToolkit.displayln()
Send a line separator to the output.static void
Display an object in the Stata Results window and automatically add a line separator at the end.static void
Display an object in the Stata Results window and automatically add a line separator at the end.static void
SFIToolkit.displayln
(Object o, DisplayMode mode) Display an object in the Stata Results window and automatically add a line separator at the end.static void
SFIToolkit.displayln
(Object o, DisplayMode mode, boolean asis) Display an object in the Stata Results window and automatically add a line separator at the end.static void
Display a string in the Stata Results window and automatically add a line separator at the end.static void
SFIToolkit.displayln
(String s, DisplayMode mode) Display a string in the Stata Results window and automatically add a line separator at the end.static void
SFIToolkit.displayln
(String s, DisplayMode mode, boolean asis) Display a string in the Stata Results window and automatically add a line separator at the end.int
Frame.drop()
Drop the frame in Stata.static int
Data.dropVar
(int var) Drop the variable at the specified variable index.static int
DataFrame.dropVar
(String rname, int var) Deprecated.Drop the variable at the specified variable index.int
Frame.dropVar
(int var) Drop the variable at the specified variable index.static void
Display an object in the Stata Results window as an error.static void
Display an object in the Stata Results window as an error.static void
Display a string in the Stata Results window as an error.static void
Display a string in the Stata Results window as an error.static boolean
SFIToolkit.errorDebug
(String s) Display a string in the Stata Results window as an error if set debug on is enabled.static boolean
SFIToolkit.errorDebug
(String s, boolean asis) Display a string in the Stata Results window as an error if set debug on is enabled.static boolean
SFIToolkit.errorDebug
(Throwable t) Display the stack trace as an error if set debug on is enabled.static void
Display an object in the Stata Results window as an error and automatically add a line separator at the end.static void
Display a string in the Stata Results window as an error and automatically add a line separator at the end.static int
SFIToolkit.errorMsg
(int rc) Display the standard Stata error message associated with return code rc in the Stata Results window.static int
DataFrame.free
(String rname) Deprecated.Free a previously allocated data frame.static double
Matrix.getAt
(double[] matrix, int colCount, int row, int col) Access an element of a previously obtained Stata matrix in the form of a one-dimensional array.static double
SFIToolkit.getCallerVersion()
Get the version number of the calling program.static double[]
Mata.getComplexAt
(double[] matrix, int colCount, int row, int col) Get an element from a previously returned matrix.static void
Mata.getComplexValues
(double[] complex, Double real, Double imaginary) Get the real and imaginary parts from a complex result.static String
Characteristic.getDtaChar
(String name) Get a characteristic for the current dataset.static String
Data.getFormattedValue
(int var, long obs, boolean bValueLabel) Read a value from the current Stata dataset, applying its display format.Frame.getFormattedValue
(int var, long obs, boolean bValueLabel) Read a value from the frame, applying its display format.static String
Frame.getFrameAt
(int index) Utility method for getting the name of a Stata frame at a given index.static int
Frame.getFrameCount()
Utility method for getting the number of frames in Stata.static String
Get the contents of a global macro.static String
Get the contents of a global macro.static String
Macro.getGlobalSafe
(String name) Get the contents of a global macro without returning null.static String
Macro.getGlobalSafe
(String name, int type) Get the contents of a global macro without returning null.static String
Get the label for a specified value-label value.static String
Deprecated.static String[]
Get the labels for a specified value-label name.static String
Get the contents of a local macro.static String
Macro.getLocalSafe
(String name) Get the contents of a local macro without returning null.static long
Mata.getMataColTotal
(String name) Get the number of columns in a Mata matrix.static double[]
Mata.getMataCompAt
(String name, long row, long col) Read a complex Mata matrix element.static String
Mata.getMataEltype
(String name) Get the type of a Mata object.static double
Mata.getMataRealAt
(String name, long row, long col) Read a real Mata matrix element.static long
Mata.getMataRowTotal
(String name) Get the number of rows in a Mata matrix.static String
Mata.getMataStringAt
(String name, long row, long col) Read a string Mata matrix element.static double[]
Get the data in a Stata matrix.static int
Matrix.getMatrixCol
(String name) Get the number of columns in a Stata matrix.static String[]
Matrix.getMatrixColNames
(String name) Get the column names of a Stata matrix.static int
Matrix.getMatrixRow
(String name) Get the number of rows in a Stata matrix.static String[]
Matrix.getMatrixRowNames
(String name) Get the row names of a Stata matrix.static String[]
ValueLabel.getNames()
Get the names of all value labels in the current dataset.static long
Data.getObsParsedIn1()
Get the first in a range of observations if Java was invoked with the in qualifier.static long
Data.getObsParsedIn2()
Get the last in a range of observations if Java was invoked with the in qualifier.static int
Data.getParsedVarCount()
Get the number of variables specified when Java was invoked.long
StrLConnector.getSize()
Get the total number of bytes available in the strL.static String
Data.getStr
(int var, long obs) Read a string value from the current Stata dataset; this method can be used to read str or strL data types.static String
DataFrame.getStr
(String rname, int var, long obs) Deprecated.Read a string value from a data frame.Frame.getStr
(int index, long obs) Read a string value from the frame.static String
Get the contents of a Stata string scalar.static String
Get the contents of a Stata string scalar.static String
SFIToolkit.getTempFile()
Get a valid Stata temporary filename.static String
SFIToolkit.getTempName()
Get a valid Stata temporary name.static Double
Get the contents of a Stata scalar.static Double
Get the contents of a Stata scalar.ValueLabel.getValueLabels
(String name) Deprecated.This method is deprecated because it is not compatible with getting labels for extended missing values; useValueLabel.getValueLabels(String, Map)
instead.static Map<LabelValue,
String> ValueLabel.getValueLabels
(String name, Map<LabelValue, String> map) Get the value and label pairings for a specified value-label name.static int[]
Deprecated.This method is deprecated because it is not compatible with getting labels for extended missing values; useValueLabel.getValueLabels(String, Map)
instead.static String
Characteristic.getVariableChar
(String variable, String name) Get a characteristic for a variable in the current dataset.static int
Data.getVarIndex
(String varname) Look up the variable index for the specified name in the current Stata dataset.static int
Deprecated.Look up the variable index for the specified name in the data frame.int
Frame.getVarIndex
(String varname) Look up the variable index for the specified variable name in the frame.static String
ValueLabel.getVarValueLabel
(int index) Get the value-label name associated with a variable.static String
SFIToolkit.getWorkingDir()
Get the current Stata working directory.boolean
StrLConnector.isBinary()
Determine if the attached strL has been marked as binary.static boolean
Mata.isTypeComplex
(String name) Determine if the matrix type is complex.static boolean
Mata.isTypeReal
(String name) Determine if the matrix type is real.static boolean
Mata.isTypeString
(String name) Determine if the matrix type is string.static boolean
Data.isVarlistSpecified()
Determine if a varlist was specified when Java was invoked.static String
SFIToolkit.processTildePath
(String path) Stata utility to convert a path beginning with a tilde to a user's home directory.static int
Data.readBytes
(StrLConnector sc, byte[] b) Read a sequence of bytes from a strL.static int
Data.readBytes
(StrLConnector sc, byte[] b, int off, int len) Read a sequence of bytes from a strL.static int
DataFrame.readBytes
(StrLConnector dsc, byte[] b) Deprecated.Read a sequence of bytes from a strL in the current Stata dataset.static int
DataFrame.readBytes
(StrLConnector dsc, byte[] b, int off, int len) Deprecated.Read a sequence of bytes from a strL in the current Stata dataset.int
Frame.readBytes
(StrLConnector dsc, byte[] b) Read a sequence of bytes from a strL.int
Frame.readBytes
(StrLConnector dsc, byte[] b, int off, int len) Read a sequence of bytes from a strL.static int
ValueLabel.removeLabel
(String name) Remove a value-label name.static int
ValueLabel.removeLabelValue
(String name, int value) Remove a value-label value from the specified value-label name.static int
ValueLabel.removeLabelValue
(String name, Missing.Extended missingValue) Remove a value-label value from the specified value-label name.static int
ValueLabel.removeVarValueLabel
(int index) Remove a value-label name from a variable.int
Rename the frame in Stata.static int
Rename a Stata variable.int
Rename a variable.void
StrLConnector.reset()
Reset the access position to its initial value.static File
SFIToolkit.resolvePath
(String path) Resolve a path to aFile
; the path may be relative to Stata's current working directory, begin with a tilde, or be an absolute path.static int
Characteristic.setDtaChar
(String name, String value) Set a characteristic for the current dataset.static int
Set the value of a global macro.static int
Set the value of a global macro.static int
Set the value of a global macro.static int
Set the value of a global macro.static int
ValueLabel.setLabelValue
(String name, int value, String label) Set a value and label for a value-label name.static int
ValueLabel.setLabelValue
(String name, Missing.Extended missingValue, String label) Set a value and label for a value-label name.static int
Set the value of a local macro.static int
Matrix.setMatrixColNames
(String name, String[] colNames) Set the column names of a Stata matrix.static int
Matrix.setMatrixRowNames
(String name, String[] rowNames) Set the row names of a Stata matrix.static int
Data.setObsTotal
(long obs) Set the number of observations in the current Stata dataset.static int
DataFrame.setObsTotal
(String rname, long obs) Deprecated.Set the number of observations in a data frame.int
Frame.setObsTotal
(long obs) Set the number of observations in the frame.void
StrLConnector.setPosition
(long pos) Set the access position.static void
SFIToolkit.setRC
(int rc) Set the Stata return code when used with Java integration (that is, java[:] blocks).static int
Set the contents of a Stata string scalar.static int
Set the contents of a Stata string scalar.static int
Set the value of a Stata scalar.static int
Set the value of a Stata scalar.static int
Set the value of a Stata scalar.static int
Set the value of a Stata scalar.static int
Data.setVarFormat
(int var, String format) Set the format for a Stata variable.static int
Deprecated.Set the format for a variable in a data frame.int
Frame.setVarFormat
(int var, String format) Set the format for a variable in the frame.static int
Characteristic.setVariableChar
(String variable, String name, String value) Set a characteristic for a variable in the current dataset.static int
Data.setVarLabel
(int var, String label) Set the label for a Stata variable.int
Frame.setVarLabel
(int var, String label) Set the label for a variable in the frame.static int
ValueLabel.setVarValueLabel
(int index, String labelName) Set the value label for a variable.static int
Data.storeBytes
(StrLConnector sc, byte[] bytes, boolean binary) Store a byte buffer to a strL.static int
DataFrame.storeBytes
(String rname, int var, long obs, byte[] bytes, boolean binary) Deprecated.Store a byte buffer to a strL in the current Stata dataset.int
Frame.storeBytes
(int var, long obs, byte[] bytes, boolean binary) Store a byte buffer to a strL in the frame.static int
Matrix.storeMatrixAt
(String name, int row, int col, double val) Store an element in an existing Stata matrix.static int
Data.storeNum
(int var, long obs, double value) Store a numeric value in the current Stata dataset.int
Frame.storeNum
(int var, long obs, double value) Store a numeric value in the frame.static int
Store a string value in the current Stata dataset; this method can be used to store str or strL data types.static int
Deprecated.Store a string value in a data frame.int
Store a string value in the frame.static int
Store a string value in the current Stata dataset; this method can be used to store str data types.int
Store a string value in the frame.static void
Data.updateModified()
Inform Stata that its data has been modified.void
Frame.updateModified()
Inform Stata that the frame's data have been modified.static int
Data.writeBytes
(StrLConnector sc, byte[] b) Write a byte buffer to a strL; the strL must be allocated usingallocateStrL
before calling this method.static int
Data.writeBytes
(StrLConnector sc, byte[] b, int off, int len) Writelen
bytes from the specified byte buffer starting at offsetoff
to a strL; the strL must be allocated usingallocateStrL
before calling this method.static int
DataFrame.writeBytes
(StrLConnector dsc, byte[] b) Deprecated.Write a byte buffer to a strL in the current Stata dataset; the strL must be allocated usingallocateStrL
before calling this method.static int
DataFrame.writeBytes
(StrLConnector dsc, byte[] b, int off, int len) Deprecated.Writelen
bytes from the specified byte buffer starting at offsetoff
to a strL in the current Stata dataset; the strL must be allocated usingallocateStrL
before calling this method.int
Frame.writeBytes
(StrLConnector dsc, byte[] b) Write a byte buffer to a strL; the strL must be allocated usingallocateStrL
before calling this method.int
Frame.writeBytes
(StrLConnector dsc, byte[] b, int off, int len) Writelen
bytes from the specified byte buffer starting at offsetoff
to a strL; the strL must be allocated usingallocateStrL
before calling this method. -
Uses of Synchronized in com.stata.sfi.util
Modifier and TypeMethodDescriptionstatic void
Preference.deleteSavedPref
(String section, String key) Delete a saved preference.static String
Preference.getSavedPref
(String section, String key, String defaultValue) Get a saved preference.static boolean
Preference.setSavedPref
(String section, String key, String value) Write a saved preference.
ValueLabel.getLabel(String, double)
instead.