SAS Micro Analytic Service
supports method overloading. In DS2, when two or more methods in
the same package have the same name, those methods are said to be overloaded.
When overloaded methods are used, the method signature (list of input
and output parameters and their types) is used to select the correct
method to execute. Because a method signature includes both input
and output parameters, any output parameter types must always be set
in tksfValues before executing the method.
Note: Each module constitutes a
separate namespace and corresponds to one DS2 package. Therefore,
two DS2 methods with the same name, in different modules, are not
considered overloaded.
Note: The C language does not support
method overloading. Syntax errors occur if two C functions with the
same name exist in the source code of the same C module. Therefore,
only DS2 package methods can be overloaded in SAS Micro Analytic Service
1.3.
Note: SAS Micro Analytic Service
1.3 supports one Python script per module. Therefore, method overloading
is not applicable to Python.
The following functions
enable you to query information about overloaded methods. For more
information about these methods, see
Java Interface Reference.
getStepInputs()
The version of getStepInputs()
that takes an index parameter retrieves descriptions of the input
parameters of the overloaded method indicated by name and index value.
That is, you can use getStepInputs() to query the input arguments
for overloaded method 1, 2, 3, and so on. To do this, specify 1, 2,
3, and so on, for the index value.
getStepOutputs()
works similarly to
getStepInputs(), but retrieves descriptions of the specified method's
output parameters.
getOverloadedStepCount()
returns the number
of overloaded methods that exist in the specified module having the
specified name.
isOverloaded()
returns True if the
specified method is overloaded and False if not.