org.drools.smf
Class DefaultImporter

java.lang.Object
  extended by org.drools.smf.DefaultImporter
All Implemented Interfaces:
java.io.Serializable, Importer

public class DefaultImporter
extends java.lang.Object
implements Importer

See Also:
Serialized Form

Constructor Summary
DefaultImporter()
           
 
Method Summary
 void addImport(ImportEntry importEntry)
           Adds an ImportEntry to a Set
 java.util.Set getImportEntries()
           
 java.util.Set getImports()
           
 java.lang.Class importClass(java.lang.ClassLoader cl, java.lang.String className)
          Imports a Class using the given ClassLoader
 boolean isEmpty()
           
 java.lang.Class lookupFromCache(java.lang.String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultImporter

public DefaultImporter()
Method Detail

getImportEntries

public java.util.Set getImportEntries()
Specified by:
getImportEntries in interface Importer
Returns:
- The Set of ImportEntries

getImports

public java.util.Set getImports()
Specified by:
getImports in interface Importer
Returns:
- the Set of imports, in text form.

addImport

public void addImport(ImportEntry importEntry)
Description copied from interface: Importer

Adds an ImportEntry to a Set

Specified by:
addImport in interface Importer
Parameters:
importEntry - - the importEntry

lookupFromCache

public java.lang.Class lookupFromCache(java.lang.String className)

importClass

public java.lang.Class importClass(java.lang.ClassLoader cl,
                                   java.lang.String className)
                            throws java.lang.ClassNotFoundException
Description copied from interface: Importer
Imports a Class using the given ClassLoader

Specified by:
importClass in interface Importer
Parameters:
cl - - the ClassLoader to use
className - - the name of the Class to import
Returns:
- the loaded class
Throws:
java.lang.ClassNotFoundException - - Thrown if a Class is not found

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Importer
Returns:
- true if no ImportEntries have been added