OVERONE.DotNetJ
Class JavaObject

Objects of this class stand for remote Java objects in the Dynamic Invocation Interface (DII) API. Allows to call methods, access fields of remote Java objects. Use one of the three public constructors to instantiate a remote Java object.

Constructor Summary
JavaObject(string channelUrl, string className)
         Instantiates a remote Java object of the specified Java class by calling its constructor.
JavaObject(string channelUrl, string className, string argType, object argVal)
         Instantiates a remote Java object of the specified Java class by calling its constructor with one parameter.
JavaObject(string channelUrl, string className, string[] argTypes, object[] argVals)
         Instantiates a remote Java object of the specified Java class by calling its constructor with parameters.

Property Summary
bool IsException
         Indicated wether the Java object is an exception object.
object Item[string fieldName]
         Accesses a field of the Java object.

Method Summary
object Invoke(string methodName)
         Invokes a method on the Java object.
object Invoke(string methodName, string argType, object argVal)
         Invokes a method on the Java object with one parameter.
object Invoke(string methodName, string[] argTypes, object[] argVals)
         Invokes a method on the Java object with parameters.

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Constructor Detail

JavaObject

public JavaObject(string channelUrl,
                  string className)

Instantiates a remote Java object of the specified Java class by calling its constructor.

Parameters:
channelUrl - The network location where the Java object must be instantiated, must be of the form java://host:port or java://host. If no port is specified, the default port is used.
className - The Java object's class name.

JavaObject

public JavaObject(string channelUrl,
                  string className,
                  string argType,
                  object argVal)

Instantiates a remote Java object of the specified Java class by calling its constructor with one parameter.

Parameters:
channelUrl - The network location where the Java object must be instantiated, must be of the form java://host:port or java://host. If no port is specified, the default port is used.
className - The Java object's class name.
argType - The argument type name. Use a Java class name, or a predefined type name with OVERONE.DotNetJ.ParameterTypeNames.
argVal - The argument.

JavaObject

public JavaObject(string channelUrl,
                  string className,
                  string[] argTypes,
                  object[] argVals)

Instantiates a remote Java object of the specified Java class by calling its constructor with parameters.

Parameters:
channelUrl - The network location where the Java object must be instantiated, must be of the form java://host:port or java://host. If no port is specified, the default port is used.
className - The Java object's class name.
argTypes - The arguments type names. Use Java class names, or predefined type names with OVERONE.DotNetJ.ParameterTypeNames.
argVals - The arguments.
Property Detail

IsException

public bool IsException

Indicated wether the Java object is an exception object.


Item

public object this[string fieldName]

Accesses a field of the Java object.

Method Detail

Invoke

public object Invoke(string methodName)

Invokes a method on the Java object.

Parameters:
methodName - The name of the method to invoke on the Java object.
Returns:
The result of the method call on the Java object. If the Java method returns something like a primitive type, a .NET primitive type is returned, otherwise a OVERONE.DotNetJ.JavaThing is returned, that can be casted to a OVERONE.DotNet.JavaObject or a OVERONE.DotNetJ.JavaArray.

Invoke

public object Invoke(string methodName,
                     string argType,
                     object argVal)

Invokes a method on the Java object with one parameter.

Parameters:
methodName - The name of the method to invoke on the Java object.
argType - The argument type name. Use a Java class name, or a predefined type name with OVERONE.DotNetJ.ParameterTypeNames.
argVal - The argument.
Returns:
The result of the method call on the Java object. If the Java method returns something like a primitive type, a .NET primitive type is returned, otherwise a OVERONE.DotNetJ.JavaThing is returned, that can be casted to a OVERONE.DotNet.JavaObject or a OVERONE.DotNetJ.JavaArray.

Invoke

public object Invoke(string methodName,
                     string[] argTypes,
                     object[] argVals)

Invokes a method on the Java object with parameters.

Parameters:
methodName - The name of the method to invoke on the Java object.
argTypes - The arguments type names. Use Java class names, or predefined type names with OVERONE.DotNetJ.ParameterTypeNames.
argVals - The arguments.
Returns:
The result of the method call on the Java object. If the Java method returns something like a primitive type, a .NET primitive type is returned, otherwise a OVERONE.DotNetJ.JavaThing is returned, that can be casted to a OVERONE.DotNet.JavaObject or a OVERONE.DotNetJ.JavaArray.