Invokes an instance method on a Java object from a static Java method.
Category: | Method Reference |
Applies to: | Java object |
specifies the name of the Java object.
specifies the result type for the static Java method. The type can be one of the following values:
specifies that the result type is BOOLEAN.
specifies that the result type is BYTE.
specifies that the result type is CHAR.
specifies that the result type is DOUBLE.
specifies that the result type is FLOAT.
specifies that the result type is INT.
specifies that the result type is LONG.
specifies that the result type is SHORT.
specifies that the result type is STRING.
specifies that the result type is VOID.
See | Type Issues in SAS Language Reference: Concepts |
specifies the name of the static Java method.
Requirement | The method name must be enclosed in either single or double quotation marks. |
specifies the parameters to pass to the method.
specifies the return value if the method returns one.
j
is instantiated, and then
the field values are set and retrieved using the CALLSTATICtypeFIELD
method.
/* Java code */ import java.util.*; import java.lang.*; public class ttestc { public static double d; public static double dm() { return d; }
/* DATA step code */
data x;
declare javaobj j("ttestc");
length d 8;
j.SetStaticDoubleField("d", 3.14159);
j.callStaticDoubleMethod("dm", d);
put d=;
run;
d=3.14159