edu.vub.at.objects
Interface Context


 Context

ATContext describes a pair of scope pointers used during evaluation, namely one storing the lexical scope (where the lookup starts for receiverless messages), one storing the late-bound receiver self.

Author:
smostinc

Method Summary
 Object lexicalScope()
          Returns the lexical environment of the current context.
 Object receiver()
          Returns the receiver (self pseudovariable) in the current context.
 Context withDynamicReceiver(Object self)
          Returns a new context object for the given dynamic receiver.
 Context withLexicalEnvironment(Object scope)
          Returns a new context object for a given scope.
 
Methods inherited from interface edu.vub.at.objects.Object
super
 

Method Detail

lexicalScope

Object lexicalScope()
Returns the lexical environment of the current context.

Returns:
an Object representing the lexical environment of the current context.

receiver

Object receiver()
Returns the receiver (self pseudovariable) in the current context.

Returns:
an Object representing the receiver in the current context.

withLexicalEnvironment

Context withLexicalEnvironment(Object scope)
Returns a new context object for a given scope.

Parameters:
scope - a scope.
Returns:
a new context for the given scope.

withDynamicReceiver

Context withDynamicReceiver(Object self)
Returns a new context object for the given dynamic receiver.

Parameters:
self - representing the receiver (self pseudovariable).
Returns:
a new context for the given dynamic receiver.