cgp.runtime
Class Namespace

java.lang.Object
  |
  +--cgp.runtime.Namespace
Direct Known Subclasses:
Scope

public class Namespace
extends java.lang.Object


Field Summary
private  java.util.HashMap table
           
 
Constructor Summary
Namespace()
           
Namespace(java.util.HashMap map)
           
 
Method Summary
 Namespace copy()
          Copy this namespace.
 void def(java.lang.String name, Type value)
           
 Type get(java.lang.String name)
           
 StringType[] getMappings()
          Return an array of coreferent variable mappings as pCG strings.
 java.lang.String[] getNames()
          Return the names in this namespace.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

table

private java.util.HashMap table
Constructor Detail

Namespace

public Namespace()

Namespace

public Namespace(java.util.HashMap map)
Method Detail

def

public void def(java.lang.String name,
                Type value)

get

public Type get(java.lang.String name)

getNames

public java.lang.String[] getNames()
Return the names in this namespace.

copy

public Namespace copy()
Copy this namespace. The members themselves are not deep copied just the container. The latter can then be added to without polluting the original.

getMappings

public StringType[] getMappings()
Return an array of coreferent variable mappings as pCG strings.