Top Description Fields Constructors Methods
sun.reflect.generics.scope

public Class DummyScope

extends Object
implements Scope
Class Inheritance
All Implemented Interfaces
sun.reflect.generics.scope.Scope
Imports
java.lang.reflect.TypeVariable

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.

Field Summary

Modifier and TypeField and Description
private static final DummyScope

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public TypeVariable<?>

Returns:

null
lookup
(String
- the name of the type variable being looked up
name
)

Implements sun.reflect.generics.scope.Scope.lookup.

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

public static DummyScope
make()

Factory method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

singletonback to summary
private static final DummyScope singleton

Constructor Detail

DummyScopeback to summary
private DummyScope()

Method Detail

lookupback to summary
public TypeVariable<?> lookup(String name)

Implements sun.reflect.generics.scope.Scope.lookup.

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

Parameters
name:String

- the name of the type variable being looked up

Returns:TypeVariable<?>

null

makeback to summary
public static DummyScope make()

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