Skip to content
jordanell edited this page May 15, 2012 · 4 revisions

The Mapping class acts as a variable name to type resolver.

Use Of Class

The Mapping class is used as a part of the variable mapping during the Parsing Stage and Resolving Stage. Mapping are said to be located inside of "blocks". A block corresponds to a scope in a Java file. All blocks are stored inside of a fully traversable stack. So when a variable needs to be looked up, we go to our "stack" and search starting at the most current block and work down in the stack until we find out desired variable.

Mapping Contains

  • Variable name. This is the name of a declared variable.
  • Variable type. This is the type of the declared variable.

Mapping Does Not Contain

  • Variable value. This is what the variable actually is equal to.

Clone this wiki locally