jnull

0th

Percentile

Creates a null object reference

.jnull returns a null reference of a specified class type.

Keywords
interface
Usage
.jnull(class = "java/lang/Object")
Arguments
class
fully qualified target class name in JNI notation (e.g. "java/lang/String").
Details

This function is necesary if null is to be passed as an argument of .jcall or .jnew, in order to be able to find the correct method/constructor.

Example: given the following method definitions of the class A:

  • o
{public static void run(String a);} o{public static void run(Double n);}

Value

  • Returns a Java object reference (jobjRef) of a null object having the specified object class.

code

.jcall("A",,"run",.jnull("java/lang/String"))

See Also

.jcall, .jcast

Aliases
  • .jnull
Examples
.jcall("java/lang/System","I","identityHashCode",.jnull())
Documentation reproduced from package rJava, version 0.4-3, License: GPL version 2

Community examples

Looks like there are no examples yet.