Name

jinvoke — Invoke a method of a Java object

Calling Sequence

      ret = jinvoke(object, methodName [, arg_1 [, arg_2...]])
    

Parameters

object

A mlist typed _JObj or _JClass or a Scilab variable

methodName

A string giving the method name

arg_i

A Scilab variable as method argument

Description

Invoke the Java method (static or not) called methodName of the given object. The result is returned as a mlist typed _JObj.

Examples

      
               jimport java.lang.System;
               jimport java.awt.Color;

               // Non-static methods
               jinvoke("Hello World !!", "length");

               // Static method
               T = jinvoke(System, "currentTimeMillis");

               // Combine
               c = jinvoke(Color, "decode", "123456");
               cb = jinvoke(c, "brighter");
               jcode = jinvoke(cb, "getRGB");
               code = junwrap(jcode)

               jremove System Color T c cb jcode;
      

See Also

jautoUnwrap , jinvoke_db

Author

Calixte Denizet