Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » MobiLink - 服务器管理 » MobiLink 服务器 API » 使用 Java 语言编写同步脚本 » 用于 Java 的 MobiLink 服务器 API 参考 » ServerContext 接口

 

getStartClassInstances 方法

语法
public java.lang.Object[ ] getStartClassInstances( )

获取包含服务器启动时所构造的启动类的数组。如果没有启动类,此数组的长度为零。

返回值

返回包含服务器启动时所构造的启动类的数组,或者如果没有启动类,则返回长度为零的数组。

示例

以下是使用 getStartClassInstances() 的一个示例:

Object objs[] = sc.getStartClassInstances();
int i;
for (i=0; i < objs.length; i += 1) {
    if (objs[i] instanceof MyClass) {
        // Use class.
    }
}
另请参见