jsint
Class Import

java.lang.Object
  extended byjsint.Import

public class Import
extends java.lang.Object


Field Summary
static java.util.Vector singles
          Fields singles and wilds should be HashSets which won't exist until JDK 1.2.
static java.util.Hashtable table
           
static java.util.Vector wilds
           
 
Method Summary
static void addImport(java.lang.String name)
          Add an import, clearing the cache if it's wild.
static java.lang.Class classNamed(java.lang.String name)
          Find a Class named name either relative to imports, or absolute, or error.
static java.util.Vector find(java.util.Vector imports, java.lang.String name, java.util.Vector classes)
           
static java.lang.Class forName(java.lang.String name)
          Ask the ClassLoader for a class given its full name.
static java.lang.ClassLoader getClassLoader()
          Get the ClassLoader used to look up classes.
static java.lang.Class maybeClassNamed(java.lang.String name)
          Returns a class or return null.
static void setClassLoader(java.lang.ClassLoader cl)
          Set the ClassLoader used to look up classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singles

public static final java.util.Vector singles
Fields singles and wilds should be HashSets which won't exist until JDK 1.2. So we simulate them with Vectors, which existed since JDK 1.0.


wilds

public static final java.util.Vector wilds

table

public static final java.util.Hashtable table
Method Detail

getClassLoader

public static java.lang.ClassLoader getClassLoader()
Get the ClassLoader used to look up classes.


setClassLoader

public static void setClassLoader(java.lang.ClassLoader cl)
Set the ClassLoader used to look up classes.


addImport

public static void addImport(java.lang.String name)
Add an import, clearing the cache if it's wild.


classNamed

public static java.lang.Class classNamed(java.lang.String name)
Find a Class named name either relative to imports, or absolute, or error. Names of the form $name are interpreted as absolute specifications for package-less classes for historical reasons.


maybeClassNamed

public static java.lang.Class maybeClassNamed(java.lang.String name)
Returns a class or return null.


find

public static java.util.Vector find(java.util.Vector imports,
                                    java.lang.String name,
                                    java.util.Vector classes)

forName

public static java.lang.Class forName(java.lang.String name)
Ask the ClassLoader for a class given its full name.