Class RJavaImport

java.lang.Object
  extended by RJavaImport
All Implemented Interfaces:
java.io.Serializable

public class RJavaImport
extends java.lang.Object
implements java.io.Serializable

Utilities to manage java packages and how they are "imported" to R databases. This is the back door of the javaImport system in the R side

Author:
Romain Francois
See Also:
Serialized Form

Field Summary
static boolean DEBUG
          Debug flag.
 java.lang.ClassLoader loader
          associated class loader
 
Constructor Summary
RJavaImport(java.lang.ClassLoader loader)
          Constructor.
 
Method Summary
 boolean exists_(java.lang.String clazz)
           
 boolean exists(java.lang.String clazz)
           
 java.lang.String[] getKnownClasses()
           
 void importPackage(java.lang.String packageName)
          Adds a package to the list of "imported" packages
 void importPackage(java.lang.String[] packages)
          Adds a set of packages
 java.lang.Class lookup(java.lang.String clazz)
          Look for the class in the set of packages
static java.lang.Class lookup(java.lang.String clazz, java.util.Set importers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Debug flag. Prints some messages if it is set to TRUE


loader

public java.lang.ClassLoader loader
associated class loader

Constructor Detail

RJavaImport

public RJavaImport(java.lang.ClassLoader loader)
Constructor. Initializes the imported package vector and the cache

Method Detail

lookup

public java.lang.Class lookup(java.lang.String clazz)
Look for the class in the set of packages

Parameters:
clazz - the simple class name
Returns:
an instance of Class representing the actual class

exists

public boolean exists(java.lang.String clazz)
Returns:
true if the class is known

exists_

public boolean exists_(java.lang.String clazz)

importPackage

public void importPackage(java.lang.String packageName)
Adds a package to the list of "imported" packages

Parameters:
packageName - package path name

importPackage

public void importPackage(java.lang.String[] packages)
Adds a set of packages

Parameters:
packages - package path names

getKnownClasses

public java.lang.String[] getKnownClasses()
Returns:
the simple names of the classes currently known by this importer

lookup

public static java.lang.Class lookup(java.lang.String clazz,
                                     java.util.Set importers)