Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

silk
Class LocalVariable  view LocalVariable download LocalVariable.java

java.lang.Object
  extended bysilk.LocalVariable

public class LocalVariable
extends java.lang.Object

A LocalVariable is denoted by its position in the environment, in terms of the number of levels "up" we have to go (number of nested environments), the number of variables "in" we have to go (ordinal position of variable), and whether the variable is a "rest" (or "dotted") variable. Example of variables in (list x y z a b): (lambda (x y) x.up=2, x.in=0 y.up=2, y.in=1 (lambda (z . a) z.up=1, z.in=0 a.up=1, a.in=1 (lambda b b.up=0, b.in=0 (list x y z a b))))


Field Summary
 int in
          The ordinal position in the environment where the variable is.
(package private)  Symbol name
          The name of the variable (for debugging purposes only).
 int up
          The number of levels up in the parent chain where the variable is.
 
Constructor Summary
LocalVariable(int up, int in, Symbol name)
          Create a new variable.
 
Method Summary
 java.lang.String toString()
          Use the name, up and in of the variable as its String representation so they distinguish themselves from a Global variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

up

public int up
The number of levels up in the parent chain where the variable is.


in

public int in
The ordinal position in the environment where the variable is.


name

Symbol name
The name of the variable (for debugging purposes only).

Constructor Detail

LocalVariable

public LocalVariable(int up,
                     int in,
                     Symbol name)
Create a new variable.

Method Detail

toString

public java.lang.String toString()
Use the name, up and in of the variable as its String representation so they distinguish themselves from a Global variable.