This function sets a particular field, which can be either static or not. If the field is static, the source should be a valid class name.
setJavaField(source, fieldName, value, affinity = 1)
this should be either a java.list instance or a single java.object instance for non-static methods or a string representing the Java class name in case of static method
the name of the field to be set
the new value of the field
a parameter used by the mclapply.j4r function in case of multithreading.
When the source is a java.object instance, this function can be substituted for the $ operator.