D represents the type of reflective
object whose scope this class is representing.
To subclass this, all one needs to do is implement
computeEnclosingScope and the subclass' constructor.
| Modifier and Type | Field and Description |
|---|---|
| private volatile Scope | enclosingScope
The enclosing scope of this scope. |
| private final D |
| Access | Constructor and Description |
|---|---|
| protected | AbstractScope(D
- A generic declaration whose scope the newly
constructed instance will represent decl)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract Scope | Returns: The enclosing scope of this scopeThis method must be implemented by any concrete subclass. |
| protected Scope | Returns: the enclosing scopeAccessor for the enclosing scope, which is computed lazily and cached. |
| protected D | Returns: The object whose scope thisScope object representsAccessor for the receiver - the object whose scope this |
| public TypeVariable | Returns: the requested type variable, if found- the name of the type variable being looked up name)Implements sun. Lookup a type variable in the scope, using its name. |
| enclosingScope | back to summary |
|---|---|
| private volatile Scope enclosingScope The enclosing scope of this scope. Lazily initialized. | |
| recvr | back to summary |
|---|---|
| private final D recvr | |
| AbstractScope | back to summary |
|---|---|
| protected AbstractScope(D decl) Constructor. Takes a reflective object whose scope the newly constructed instance will represent.
| |
| computeEnclosingScope | back to summary |
|---|---|
| protected abstract Scope computeEnclosingScope() This method must be implemented by any concrete subclass. It must return the enclosing scope of this scope. If this scope is a top-level scope, an instance of DummyScope must be returned.
| |
| getEnclosingScope | back to summary |
|---|---|
| protected Scope getEnclosingScope() Accessor for the enclosing scope, which is computed lazily and cached.
| |
| getRecvr | back to summary |
|---|---|
| protected D getRecvr() Accessor for the receiver - the object whose scope this
| |
| lookup | back to summary |
|---|---|
| public TypeVariable Implements sun. Lookup a type variable in the scope, using its name. Returns null if no type variable with this name is declared in this scope or any of its surrounding scopes.
| |