JavaVM:
GetSuperClass method
Description
Returns
the name of the super class of the class of the Java object that
a PowerBuilder proxy object represents.
Syntax
|
1 |
<span>javavm</span>.GetSuperClass(powerobject <span>proxyobject</span><span></span>) |
|
Argument |
Description |
|---|---|
|
javavm |
An instance of the JavaVM class |
|
proxyobject |
An instantiated PowerBuilder proxy object |
Return Values
String. If the current Java object is Java.lang.Object or
an interface, returns null.
Examples
This example assumes that you have subclassed the
Java Decimal class. Your class, My.Decimal, extends java.lang.Decimal.
After you build a proxy project for this class, you can determine
the real Java class name that the proxy represents with code like
the following:
|
1 |
java_decimal dec_num<br>string classname, supername<br> <br>conn.createjavainstance(dec_num, "java_decimal")<br>classname = g_javavm.getactualclass(dec_num) &<br>   classname = "My.Decimal"<br>supername = g_javavm.getsuperclass(dec_num) &<br>   supername = "java.lang.Decimal" |
Usage
This method returns the name of the immediate parent of the
class referenced by the proxy object. For example, if proxyobject is
a java.io.FilterReader, GetSuperClass returns java.io.Reader. GetSuperClass can
be used in conjunction with the GetInterfaces and DynamicCast methods
to cast a proxy object returned from an EJB method call to a different
object.
For more information, see the description of the DynamicCast method.