polyglot.types
Class ClassContextResolver
java.lang.Object
polyglot.types.ClassResolver
polyglot.types.ClassContextResolver
- All Implemented Interfaces:
- Resolver
public class ClassContextResolver
- extends ClassResolver
A ClassContextResolver
looks up type names qualified with a class name.
For example, if the class is "A.B", the class context will return the class
for member class "A.B.C" (if it exists) when asked for "C".
Method Summary |
ClassType |
classType()
The class in whose context we look. |
Named |
find(java.lang.String name)
Find a type object in the context of the class. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ts
protected TypeSystem ts
type
protected ClassType type
TOPICS
protected static final java.util.Collection TOPICS
ClassContextResolver
public ClassContextResolver(TypeSystem ts,
ClassType type)
- Construct a resolver.
- Parameters:
ts
- The type system.type
- The type in whose context we search for member types.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
find
public Named find(java.lang.String name)
throws SemanticException
- Find a type object in the context of the class.
- Specified by:
find
in interface Resolver
- Specified by:
find
in class ClassResolver
- Parameters:
name
- The name to search for.
- Throws:
SemanticException
classType
public ClassType classType()
- The class in whose context we look.