jcall: Same as .jcall but with check = FALSE as default

Description Usage Arguments

Description

Same as .jcall but with check = FALSE as default

Usage

1
2
3
jcall(obj, returnSig = "V", method, ..., evalArray = TRUE,
  evalString = TRUE, check = FALSE, interface = "RcallMethod",
  simplify = FALSE, use.true.class = FALSE)

Arguments

obj

Java object (jobjRef as returned by .jcall or .jnew) or fully qualified class name in JNI notation (e.g. "java/lang/String").

returnSig

Return signature in JNI notation (e.g. "V" for void, "[I" for int[] etc.). For convenience additional type "S" is supported and expanded to "Ljava/lang/String;", re-mapping "T" to represent the type short.

method

The name of the method to be called

...

Any parametes that will be passed to the Java method. The parameter types are determined automatically and/or taken from the jobjRef object. All named parameters are discarded.

evalArray

This flag determines whether the array return value is evaluated (TRUE) or passed back as Java object reference (FALSE).

evalString

This flag determines whether string result is returned as characters or as Java object reference.

check

If set to TRUE then checks for exceptions are performed before and after the call using .jcheck(silent=FALSE). This is usually the desired behavior, because all calls fail until an expection is cleared.

interface

This option is experimental and specifies the interface used for calling the Java method; the current implementation supports two interfaces:

  • "RcallMethod"the default interface.

  • "RcallSyncMethod"synchronized call of a method. This has simmilar effect as using synchronize in Java.

simplify

If evalArray is TRUE then this argument is passed to .jevalArray().

use.true.class

logical. If set to TRUE, the true class of the returned object will be used instead of the declared signature. TRUE allows for example to grab the actual class of an object when the return type is an interface, or allows to grab an array when the declared type is Object and the returned object is an array. Use FALSE for efficiency when you are sure about the return type.


hoesler/dbj documentation built on May 17, 2019, 4:36 p.m.