edu.rice.cs.dynamicjava.symbol
Class TreeLibrary

java.lang.Object
  extended by edu.rice.cs.dynamicjava.symbol.TreeLibrary
All Implemented Interfaces:
Library

public class TreeLibrary
extends Object
implements Library


Constructor Summary
TreeLibrary(Iterable<CompilationUnit> cus, ClassLoader parentLoader, Options opt)
          Create a library based on the given parsed compilation units.
 
Method Summary
 ClassLoader classLoader()
          Get a class loader for loading the classes in the library.
 Iterable<DJClass> declaredClasses(String fullName)
          Get any top-level classes with the given fully-qualified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeLibrary

public TreeLibrary(Iterable<CompilationUnit> cus,
                   ClassLoader parentLoader,
                   Options opt)
Create a library based on the given parsed compilation units. Every top-level class or interface declaration will be indexed; the DJ_CLASS, FIELD, and METHOD properties will be set immediately for each of these classes and their declared members (applied recursively). On the other hand, types appearing in signatures must be tagged subsequently, and until that occurs, the type-related operations of DJClass will fail.

Method Detail

declaredClasses

public Iterable<DJClass> declaredClasses(String fullName)
Description copied from interface: Library
Get any top-level classes with the given fully-qualified name. Typically, there should be exactly one result. If the class is not defined, returns an empty list. If multiple classes have the given name, returns all of them.

Specified by:
declaredClasses in interface Library

classLoader

public ClassLoader classLoader()
Description copied from interface: Library
Get a class loader for loading the classes in the library.

Specified by:
classLoader in interface Library