com.google.javascript.rhino.testing
Class EmptyScope

java.lang.Object
  extended by com.google.javascript.rhino.testing.EmptyScope
All Implemented Interfaces:
StaticScope<JSType>

public class EmptyScope
extends Object
implements StaticScope<JSType>

An empty scope implementation.


Constructor Summary
EmptyScope()
           
 
Method Summary
 StaticSlot<JSType> getOwnSlot(String name)
          Like getSlot but does not recurse into parent scopes.
 StaticScope<JSType> getParentScope()
          Returns the scope enclosing this one or null if none.
 StaticSlot<JSType> getSlot(String name)
          Returns any defined slot within this scope for this name.
 JSType getTypeOfThis()
          Returns the expected type of this in the current scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyScope

public EmptyScope()
Method Detail

getParentScope

public StaticScope<JSType> getParentScope()
Description copied from interface: StaticScope
Returns the scope enclosing this one or null if none.

Specified by:
getParentScope in interface StaticScope<JSType>

getSlot

public StaticSlot<JSType> getSlot(String name)
Description copied from interface: StaticScope
Returns any defined slot within this scope for this name. This call continues searching through parent scopes if a slot with this name is not found in the current scope.

Specified by:
getSlot in interface StaticScope<JSType>
Parameters:
name - The name of the variable slot to look up.
Returns:
The defined slot for the variable, or null if no definition exists.

getOwnSlot

public StaticSlot<JSType> getOwnSlot(String name)
Description copied from interface: StaticScope
Like getSlot but does not recurse into parent scopes.

Specified by:
getOwnSlot in interface StaticScope<JSType>

getTypeOfThis

public JSType getTypeOfThis()
Description copied from interface: StaticScope
Returns the expected type of this in the current scope.

Specified by:
getTypeOfThis in interface StaticScope<JSType>