setConvertible: Register a Java class as being convertible to an R object

Description Usage Arguments Details Value Author(s) References See Also


When a value is to be returned from Java to R, the Omegahat evaluator examines a table to determine if an object of that type can be converted to R. This function manipulates that table and allows one to control for what types of objects conversion is attempted.

This is not used currently. The Java objects are returned directly and the user-level converters determine whether the object is ‘convertible’.


setJavaConvertible(klass, ok=TRUE, matching=0)



The name of a Java class or interface which is to be added or removed from the set of known convertible classes. This can be a partially qualified class name that is resolved by the Omegahat evaluator.


logical value indicating whether objects of class klass are to be considered convertible or not by the Omegahat sub-system.


an integer value from the set 0, 1 and 2. These values indicate how comparisons between the registerd class and the object to be converted are performed.


An exact match, meaning that the class of the object must be the same as the class being registered as convertible.


the target object must be an instance of the class being registered, meaning that it implements this Java interface or is an instance of a class that is derived from the registered one.


the target object must be compatible with the registered class in the sense of isAssignableFrom method between two classes.

These constants are defined in the Java interface ConvertibleClassifierInt.


Simply calls setJavaConvertible in the Omegahat evaluator which passes the request on to the ConverterClassifierInt object employed by that evaluator.


NULL corresponding to a call to a Java method returning void.


Duncan Temple Lang


See Also

setJavaConverter getJavaConverterDescriptions getNumJavaConverters

SJava documentation built on Oct. 5, 2016, 4:17 a.m.

Related to setConvertible in SJava...