.jfield
returns the value of the specified field on an object..jfield(o, sig = NULL, name, true.class = is.null(sig), convert = TRUE)
`.jfield<-`(o, name, value)
NULL
rJava attempts to determine the signature using reflection. For
efficiency it is recommended to specify the signature, because
the reflection lookup is quite expensive.TRUE
causes
.jfield
to use true class name of the resulting object
instead. (this flag has no effect on scalar fielTRUE
all references are converted to
native types (where possible). Otherwise Java references are
returned directly..jcall
- be sure to cast the value
as necessary, no au.jfield
: contents of the field, .jfield<-
: modified object..jfield
using reflection
is considerably expensive (more than 3 additional method calls have to
be performed), therefore it is recommended for time-critical code to
specify the field signature beforehand. NOTE: The sequence of arguments in .jfield
has been changed
since rJava 0.5 to be more consistent and match the sequence in
.jcall
. Also .jsimplify
is no longer needed as primitive
types are obtained directly.
.jcall
.jfield("java/lang/Boolean",, "TYPE")
Run the code above in your browser using DataLab