polyglot.types
Class SystemResolver

java.lang.Object
  extended by polyglot.types.CachingResolver
      extended by polyglot.types.SystemResolver
All Implemented Interfaces:
java.lang.Cloneable, Resolver, TopLevelResolver, Copy

public class SystemResolver
extends CachingResolver
implements TopLevelResolver

The SystemResolver is the main resolver for fully-qualified names.


Field Summary
 
Fields inherited from class polyglot.types.CachingResolver
inner
 
Constructor Summary
SystemResolver(TopLevelResolver inner, ExtensionInfo extInfo)
          Create a caching resolver.
 
Method Summary
 void addNamed(java.lang.String name, Named q)
          Install a qualifier in the cache.
protected  void cachePackage(Package p)
           
 Type checkType(java.lang.String name)
          Check if a type is in the cache, returning null if not.
 void clearAdded()
           
 java.lang.Object copy()
           
 Named find(java.lang.String name)
          Find a type object by name.
 void install(java.lang.String name, Named q)
          Install a qualifier in the cache.
 boolean installedInAll(java.lang.String name, Named q)
           
 void installInAll(java.lang.String name, Named n)
           
 java.util.Collection justAdded()
           
 boolean packageExists(java.lang.String name)
          Check if a package exists.
protected  boolean packageExistsInCache(java.lang.String name)
          Check if a package exists in the resolver cache.
 SystemResolver previous()
           
 void putAll(SystemResolver r)
           
 
Methods inherited from class polyglot.types.CachingResolver
cachedObjects, check, dump, inner, shouldReport, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemResolver

public SystemResolver(TopLevelResolver inner,
                      ExtensionInfo extInfo)
Create a caching resolver.

Parameters:
inner - The resolver whose results this resolver caches.
Method Detail

previous

public SystemResolver previous()

copy

public java.lang.Object copy()
Specified by:
copy in interface Copy
Overrides:
copy in class CachingResolver

installInAll

public void installInAll(java.lang.String name,
                         Named n)

installedInAll

public boolean installedInAll(java.lang.String name,
                              Named q)

packageExistsInCache

protected boolean packageExistsInCache(java.lang.String name)
Check if a package exists in the resolver cache.


packageExists

public boolean packageExists(java.lang.String name)
Check if a package exists.

Specified by:
packageExists in interface TopLevelResolver

cachePackage

protected void cachePackage(Package p)

checkType

public Type checkType(java.lang.String name)
Check if a type is in the cache, returning null if not.

Parameters:
name - The name to search for.

justAdded

public java.util.Collection justAdded()

clearAdded

public void clearAdded()

putAll

public void putAll(SystemResolver r)
            throws SemanticException
Throws:
SemanticException

find

public Named find(java.lang.String name)
           throws SemanticException
Description copied from class: CachingResolver
Find a type object by name.

Specified by:
find in interface Resolver
Overrides:
find in class CachingResolver
Parameters:
name - The name to search for.
Throws:
SemanticException

install

public void install(java.lang.String name,
                    Named q)
Description copied from class: CachingResolver
Install a qualifier in the cache.

Overrides:
install in class CachingResolver
Parameters:
name - The name of the qualifier to insert.
q - The qualifier to insert.

addNamed

public void addNamed(java.lang.String name,
                     Named q)
              throws SemanticException
Install a qualifier in the cache.

Overrides:
addNamed in class CachingResolver
Parameters:
name - The name of the qualifier to insert.
q - The qualifier to insert.
Throws:
SemanticException