polyglot.types
Class PackageContextResolver

java.lang.Object
  extended bypolyglot.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 packge by name.


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.
 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
 

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.


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()