public class

DummyScope

extends Object
implements Scope
java.lang.Object
   ↳ sun.reflect.generics.scope.DummyScope

Class Overview

This class is used to provide enclosing scopes for top level classes. We cannot use null to represent such a scope, since the enclosing scope is computed lazily, and so the field storing it is null until it has been computed. Therefore, null is reserved to represent an as-yet-uncomputed scope, and cannot be used for any other kind of scope.

Summary

Public Methods
TypeVariable<?> lookup(String name)
Lookup a type variable in the scope, using its name.
static DummyScope make()
Factory method.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sun.reflect.generics.scope.Scope

Public Methods

public TypeVariable<?> lookup (String name)

Lookup a type variable in the scope, using its name. Always returns null.

Parameters
name - the name of the type variable being looked up
Returns
  • null

public static DummyScope make ()

Factory method. Enforces the singleton pattern - only one instance of this class ever exists.