org.omegahat.Environment.Tools.ClassList
Class ClassList
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--org.omegahat.Environment.Utils.OrderedTable
|
+--org.omegahat.Environment.Tools.ClassList.ObjectList
|
+--org.omegahat.Environment.Tools.ClassList.ClassList
- All Implemented Interfaces:
- Activable, AssignableSubset, java.lang.Cloneable, Database, java.util.Map, java.io.Serializable, ShallowCopyable, Subsettable
- Direct Known Subclasses:
- ArchiveClassList, GroupedClassLocator, LocalClassList, PackageClassList, PrefixClassList, URLClassList
- public class ClassList
- extends ObjectList
- implements java.io.Serializable
Objects of this class are used to store the list of classes
associated with a specific element of the CLASSPATH
System.getProperty("java.class.path").
This class is also used to find classes using short-hand or
unqualified names. An Evaluator
instance typically creates a
table (see ClassLocator of these elements based on its classpath. This is done when
it is first needed, which is either when the first class is searched
for or if the graphical interface shows the class elements.
- See Also:
- Serialized Form
| Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
|
Method Summary |
java.lang.Object |
add(java.lang.Object obj,
java.lang.Object name)
Add the specified object to the table indexed by the given key. |
java.lang.Object |
find(java.lang.String name)
|
java.lang.Class |
findClass(java.lang.String name)
|
java.lang.Class |
loadClass(java.lang.String name)
|
protected int |
lookup()
Compute the elements of the list by interrogating
the source "file" and processing it recursively. |
int |
lookupZip(java.util.zip.ZipFile zip)
|
java.lang.String |
packageName()
|
java.lang.String |
packageName(java.lang.Object o)
|
void |
setPackageName(java.lang.String val)
|
java.lang.String |
toClassName(java.lang.String str)
|
| Methods inherited from class org.omegahat.Environment.Tools.ClassList.ObjectList |
add, add, addElement, archive, checkIsArchive, computeTime, computeTime, directoryFilter, directoryFilter, doneSearch, doneSearch, entries, file, file, file, fileSeparator, getDirectory, isArchive, issuedWarning, issuedWarning, lookupArchive, lookupDirectory, lookupDirectory, matchesClassName, newSubList, processDirectoryClasses, processSubDirectories, recursive, recursive, refresh, refresh, sourceIsNewer, warn, warnDirectory |
| Methods inherited from class org.omegahat.Environment.Utils.OrderedTable |
add, addListListener, assign, assignSubset, attach, clear, copy, copy, detach, elementAt, exists, get, getName, getState, keys, listeners, listeners, notifyListeners, objects, ordered, orderedKeys, put, put, put, remove, remove, removeElement, removeElement, removeElementAt, removeElementAt, removeListListener, setElementAt, setName, setState, subset, subset, subset |
| Methods inherited from class java.util.Hashtable |
clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, rehash, size, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.omegahat.Environment.Databases.Database |
size |
packageName
protected java.lang.String packageName
Debug
public static boolean Debug
verbose
public static boolean verbose
ClassList
public ClassList(java.io.File f)
ClassList
public ClassList()
setPackageName
public void setPackageName(java.lang.String val)
lookup
protected int lookup()
- Description copied from class:
ObjectList
- Compute the elements of the list by interrogating
the source "file" and processing it recursively.
Invokes the appropriate code according to whether
the source is a directory or an archive file.
- Overrides:
lookup in class ObjectList
- Following copied from class:
org.omegahat.Environment.Tools.ClassList.ObjectList
- Returns:
- the number of elements in the list or
negative numbers indicating the nature of the error.
| -1 | degenerate source file object |
| -3 | source is neither an archive or directory |
- See Also:
- ,
ObjectList.lookupDirectory(java.io.File)
lookupZip
public int lookupZip(java.util.zip.ZipFile zip)
find
public java.lang.Object find(java.lang.String name)
- Overrides:
find in class ObjectList
findClass
public java.lang.Class findClass(java.lang.String name)
toClassName
public java.lang.String toClassName(java.lang.String str)
- Overrides:
toClassName in class ObjectList
loadClass
public java.lang.Class loadClass(java.lang.String name)
throws java.lang.ClassNotFoundException
packageName
public java.lang.String packageName()
packageName
public java.lang.String packageName(java.lang.Object o)
add
public java.lang.Object add(java.lang.Object obj,
java.lang.Object name)
- Description copied from class:
OrderedTable
- Add the specified object to the table indexed by the given key.
Note the order.
- Overrides:
add in class OrderedTable
- Following copied from class:
org.omegahat.Environment.Utils.OrderedTable
- Parameters:
value - the object to be entered into the table.key - the index in the table by which- Returns:
- the value being inserted into the table.