.JavaRef(object=NULL, javaClass=NULL) .JavaRefIsArray(object) .JavaRefIsNull(object) .JavaRefIsPrimitive(object) .JavaRefIsRef(object) .JavaRefIsValid(object) .JavaSimplify(object)
object | any object, including a Java object reference. |
javaClass | a string specifying a full Java classname, such as "Ljava/lang/Math;". This class can also be specified as "java/lang/Math" or "java.lang.Math". |
.JavaRef | returns a Java object reference to the new Java object created with the specified class. If object is already a Java object reference, it is just returned. |
.JavaRefIsArray | returns TRUE if object is a Java object reference to a Java array. |
.JavaRefIsNull | returns TRUE if object is a Java object reference to the null Java object. |
.JavaRefIsArray | returns TRUE is object is a Java object reference to a Java array. |
.JavaRefIsPrimitive | returns TRUE if object is a Java object reference to a primitive Java value, such as a scalar integer or double. |
.JavaRefIsRef | returns TRUE if object is a Java object reference. |
.JavaRefIsValid | returns TRUE if object is a valid Java object reference. A Java object reference object becomes invalid when it is serialized and deserialized. |
.JavaSimplify | returns a Java object reference converted to a simpler object, such as a Java double array converted to a double vector. If object is not a Java object reference, it is just returned. If object is a Java object reference that cannot be converted, it is just returned. |
## create a Java reference to an integer array xx <- .JavaRef(1:3).JavaRefIsArray(xx) ## TRUE .JavaRefIsNull(xx) ## FALSE .JavaRefIsPrimitive(xx) ## FALSE .JavaRefIsRef(xx) ## TRUE .JavaRefIsValid(xx) ## TRUE
.JavaSimplify(xx) ## [1] 1 2 3
## make references to the Java null object .JavaRef(NULL, "java.lang.Object") .JavaRef(NULL, "java.lang.String")