public class MatlabFunctionCreator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FILE_BASE_NAME
Base name of all temporary files created.
|
static java.lang.String |
FILE_EXTENSION
File extension of all temporary files created.
|
Constructor and Description |
---|
MatlabFunctionCreator(java.lang.String resourcePath,
java.lang.String... arguments)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCDString()
Returns the command for Matlab to switch its current directory to the temporary directory.
|
java.lang.String |
getFullInvokeString()
Returns a string with which the Matlab function can be called.
|
java.lang.String |
getFunctionCallString()
Returns a string with which the Matlab function can be called.
|
java.lang.String |
getFunctionName()
Returns the name of the function created.
|
java.lang.String |
getFunctionPath()
Returns the path to the temporary directory where the created Matlab function is stored.
|
void |
initialize()
Creates the Matlab temporary function file.
|
void |
uninitialize()
Deletes the temporary Matlab string, if necessary.
|
public static final java.lang.String FILE_BASE_NAME
public static final java.lang.String FILE_EXTENSION
public MatlabFunctionCreator(java.lang.String resourcePath, java.lang.String... arguments)
resourcePath
- The resource path to the Matlab script in a jar file.arguments
- The arguments the Matlab function takes. Typically, the same as the names of the variables provided to Matlab.public java.lang.String getFunctionName()
public java.lang.String getFunctionPath()
public java.lang.String getFunctionCallString()
public java.lang.String getCDString()
public java.lang.String getFullInvokeString()
getCDString()
and getFunctionCallString()
.public void initialize() throws ResourceException
ResourceException
- Thrown if file could not be created.public void uninitialize() throws ResourceException
ResourceException
- Thrown if file could not be deleted.