javaImport: Attach mechanism for java packages

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

Description

The javaImport function creates an item on R's search that maps names to class names references found in one or several "imported" java packages.

Usage

1
javaImport(packages = "java.lang")

Arguments

packages

character vector containing java package paths

Value

An external pointer to a java specific UserDefinedDatabase object

Warning

This feature is experimental. Use with caution, and don't forget to detach.

Note

Currently the list of objects in the imported package is populated as new objects are found, not at creation time.

Author(s)

Romain Francois <francoisromain@free.fr>

References

User-Defined Tables in the R Search Path. Duncan Temple Lang. December 4, 2001 http://www.omegahat.org/RObjectTables/

See Also

attach

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
	attach( javaImport( "java.util" ), pos = 2 , name = "java:java.util" )
	
	# now we can just do something like this 
	v <- new( Vector )
	v$add( "foobar" )
	ls( pos = 2 )
	
	# or this
	m <- new( HashMap )
	m$put( "foo", "bar" )
	ls( pos = 2 )
	
	# or even this :
	Collections$EMPTY_MAP

## End(Not run)


Search within the rJava package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.