|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.frontend.SourceLoader
public class SourceLoader
A SourceLoader
is responsible for loading source files.
Field Summary | |
---|---|
protected int |
caseInsensitive
0 if unknown, 1 if case insensitive, -1 if not. |
protected java.util.Map |
directoryContentsCache
This is a map from Files (of directories) to Set[String]s, which records the first level of contents of the directory. |
protected java.util.Set |
loadedSources
Set of sources already loaded. |
protected ExtensionInfo |
sourceExt
|
protected java.util.Collection |
sourcePath
|
Constructor Summary | |
---|---|
SourceLoader(ExtensionInfo sourceExt,
java.util.Collection sourcePath)
|
Method Summary | |
---|---|
protected java.lang.String |
canonicalize(java.lang.String fileName)
|
boolean |
caseInsensitive()
Is the file system case insensitive. |
FileSource |
classSource(java.lang.String className)
Load the source file for the given class name using the source path. |
protected static java.io.File |
current_dir()
The current user directory. |
java.lang.Object |
fileKey(java.io.File file)
|
FileSource |
fileSource(java.lang.String fileName)
Load a source from a specific file. |
boolean |
packageExists(java.lang.String name)
Check if a directory for a package exists. |
protected void |
setCaseInsensitive(java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ExtensionInfo sourceExt
protected java.util.Collection sourcePath
protected int caseInsensitive
protected java.util.Set loadedSources
protected java.util.Map directoryContentsCache
Constructor Detail |
---|
public SourceLoader(ExtensionInfo sourceExt, java.util.Collection sourcePath)
Method Detail |
---|
public FileSource fileSource(java.lang.String fileName) throws java.io.IOException
java.io.IOException
protected static java.io.File current_dir()
public boolean packageExists(java.lang.String name)
public FileSource classSource(java.lang.String className)
public java.lang.Object fileKey(java.io.File file)
public boolean caseInsensitive()
protected void setCaseInsensitive(java.lang.String fileName)
protected java.lang.String canonicalize(java.lang.String fileName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |