RtoJavaSig: Returns the Java type identifier for an R object

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

Description

This takes the given object and returns a string that can be used in the This is of most use for primitivesso that one doesn't have to remember the different Java characters representing its primitive types. This is currently not useful for non-primitive objects (e.g. lists) until javaSig is enhanced.

Usage

1

Arguments

obj

Any R object, but the result is currently only meaningful if this is a primitive.

Details

This examines the class and/or mode of the specified object and then calls javaSig to find the name of the Java class corresponding to the name of the given object's type.

Value

A character vector of length 1 identifying the Java type (primitive or class) corresponding to the type of the input object.

Note

This will be enhanced in future versions as more elaborate conversion mechanisms are added.

Author(s)

John Chmabers, Duncan Temple Lang

References

http://www.omegahat.org, http://www.javasoft.com

See Also

javaSig

Examples

1
2
3
4
 javaSig(1)
 javaSig(as.integer(10))
 javaSig("a string")
 javaSig(list(a=1))

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

Related to RtoJavaSig in SJava...