polyglot.types
Class PackageContextResolver

java.lang.Object
  extended by polyglot.types.PackageContextResolver
All Implemented Interfaces:
Resolver

public class PackageContextResolver
extends java.lang.Object
implements Resolver

A PackageContextResolver is responsible for looking up types and packages in a package by name.


Field Summary
protected  Resolver cr
           
protected  Package p
           
protected  TypeSystem ts
           
 
Constructor Summary
PackageContextResolver(TypeSystem ts, Package p, Resolver cr)
          Create a package context resolver.
 
Method Summary
 Named find(java.lang.String name)
          Find a type object by name.
 Resolver outer()
          The system resolver.
 Package package_()
          The package in whose context to search.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

p

protected Package p

ts

protected TypeSystem ts

cr

protected Resolver cr
Constructor Detail

PackageContextResolver

public PackageContextResolver(TypeSystem ts,
                              Package p,
                              Resolver cr)
Create a package context resolver.

Parameters:
ts - The type system.
p - The package in whose context to search.
cr - The resolver to use for looking up types.
Method Detail

package_

public Package package_()
The package in whose context to search.


outer

public Resolver outer()
The system resolver.


find

public Named find(java.lang.String name)
           throws SemanticException
Find a type object by name.

Specified by:
find in interface Resolver
Throws:
SemanticException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object