<< jgetclassname JIMS jgetfields >>

JIMS >> JIMS > jgetfield

jgetfield

Get the field value of a Java object

Calling Sequence

jgetfield(object, fieldName [, unwrap])

Parameters

object

A mlist typed _JObj or _JClass or a Scilab variable

fieldName

A string giving the field name

unwrap

A single boolean

Description

Get the value of the field named fieldName. If the optional third argument is true, then the value is automatically unwrapped.

Examples

c = jcompile("Test", ["public class Test {";
                      "public int field;";
                      "public Test(int n) {";
                      "field = n;";
                      "}";
                      "}";]);
t = c.new(128);
v = jgetfield(t, "field")

// or more easier
junwraprem(t.field)

jremove c t v;

See Also

Author


<< jgetclassname JIMS jgetfields >>