Home » openjdk-7 » sun.reflect.generics » scope » [javadoc | source]
abstract public class: AbstractScope [javadoc | source]

All Implemented Interfaces:

Direct Known Subclasses:
    MethodScope, ConstructorScope, ClassScope

Abstract superclass for lazy scope objects, used when building factories for generic information repositories. The type parameter 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.
 protected AbstractScope(D decl) 
Method from sun.reflect.generics.scope.AbstractScope Summary:
computeEnclosingScope,   getEnclosingScope,   getRecvr,   lookup
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.reflect.generics.scope.AbstractScope Detail:
 abstract protected 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.
 protected Scope getEnclosingScope() 
    Accessor for the enclosing scope, which is computed lazily and cached.
 protected D getRecvr() 
    Accessor for the receiver - the object whose scope this Scope object represents.
 public TypeVariable<?> lookup(String name) 
    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.