org.extendj.ast
class ClassPath

General Info

Type Hierarchy:
java.lang.Object
  extended by org.extendj.ast.ClassPath

Description

Source
Declared in /home/jesper/git/extendj/java4/frontend/ClassPath.jrag at line 131
Aspect
ClassPath

Member Filters

API level:

Aspect:

Constructors

public ClassPath(Program program)

Methods

public void initEmptyPaths()
Used to make the classpath empty, in case you want more control over the classpath initialization. Usually you would use addClassPath to manually setup the classpath after this.
public java.io.InputStream getInputStream(java.lang.String name)
Get the input stream for a compilation unit specified using a canonical name. This is used by the bytecode reader to load nested types.
Parameters:
name - The canonical name of the compilation unit.
public CompilationUnit getCompilationUnit(java.lang.String typeName,
                                          CompilationUnit defaultCompilationUnit)
Load a compilation unit from disk based on a classname. A class file is parsed if one exists matching the classname that is not older than a corresponding source file, otherwise the source file is selected.

This method is called by the LibCompilationUnit NTA. We rely on the result of this method being cached because it will return a newly parsed compilation unit each time it is called.

Returns:
the loaded compilation unit, or the provided default compilation unit if no matching compilation unit was found.
public void addPackage(java.lang.String packageName)
Add a package name to available package set.
public void addClassPath(PathPart pathPart)
Add a path part to the library class path.
public void addSourcePath(PathPart pathPart)
Add a path part to the user class path.
public boolean isPackage(java.lang.String packageName)
Quick pass, slow fail. Cache existing package names in a concurrent set.
Returns:
true if there is a package with the given name on the classpath
public java.util.Collection<PathPart> getSourcePath()
Returns:
a copy of the source path parts
public java.util.Collection<PathPart> getClassPath()
Returns:
a copy of the class path parts

Inherited Members

Methods inherited from class java.lang.Object

clone
equals
finalize
getClass
hashCode
notify
notifyAll
toString
wait
wait
wait