Obtains the value of a field
.jfield returns the value of the specified field on an object.
.jfield(o, name, simplify=TRUE, true.class=TRUE)
- Class name or object (Java reference) whose field is to be accessed. Static fields are supported both by specifying the class name or using an instance.
- name of the field to access
- field accessor methods always return Java objects. If
TRUE, such object will be converted to scalar type if possible (see
- field accessor methods always return objects of the
java.lang.Object. If set to
TRUE, the true Java class is determined and the returned object's class will be adjusted.
.jfield uses reflection to access value of a field of a given
- Contents of the field.
z <- .jnew("java/lang/Boolean", TRUE) .jfield(z, "TYPE")
Looks like there are no examples yet.