polyglot.types
Class ClassContextResolver
java.lang.Object
polyglot.types.AbstractAccessControlResolver
polyglot.types.ClassContextResolver
- All Implemented Interfaces:
- AccessControlResolver, Resolver
public class ClassContextResolver
- extends AbstractAccessControlResolver
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".
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
type
protected ClassType type
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,
ClassType accessor)
throws SemanticException
- Find a type object in the context of the class.
- Parameters:
name - The name to search for.
- Throws:
SemanticException
canAccess
protected boolean canAccess(Named n,
ClassType accessor)
classType
public ClassType classType()
- The class in whose context we look.