createTransientMethod

createTransientMethod(methodName:        String;
                      schemaType:        Type;
                      schema:            Schema;
                      sourceCode:        String;
                      isWorkspaceMethod: Boolean;
                      returnType:        Type;
                      errorCode:         Integer output;
                      errorPosition:     Integer output;
                      errorLength:       Integer output): JadeMethod;

The createTransientMethod method of the Process class creates and compiles a transient Jade method and returns a Jade method that can be subsequently executed by using the Process class executeTransientMethod or executeTransientIOMethod method.

The createTransientMethod method parameters are listed in the following table.

Parameter Description
methodName The name of the method to be created. For non-Workspace methods, this parameter must match the method name specified in the signature in the source code.
schemaType The owner type, or owner root type, of the method (that is, the type of the method receiver) and it is the type of the self system variable.
schema The schema against which the method is to be compiled and which is searched when resolving the names of classes referenced in the method.
sourceCode The method source code to be compiled.
isWorkspaceMethod Specifies whether the source code is in Jade Workspace format (that is, it has no method signature). Jade Workspace format transient methods cannot update the receiver directly.
returnType Specifies the type of the result value returned by Workspace methods. For non-Workspace methods, this parameter is not used and the return type is specified in the method signature in the source code.
errorCode The error code returned by the compiler. A value of zero (0) indicates that the method compiled successfully.
errorPosition The position of the error in the source code. Note that the first character of the source code has a position of zero (0).
errorLength The length in characters of the error in the source code.

If the method returns a null value, the error parameters return compiler information that indicates the cause of the error. For an example of the use of the createTransientMethod method, see the Process class executeTransientMethod method.

Use the Process class deleteTransientMethod method to delete the transient method.