uk.ac.man.cs.rainbow.rapa
Class BasicNamingContext

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.rapa.NamingContext
        |
        +--uk.ac.man.cs.rainbow.rapa.BasicNamingContext
Direct Known Subclasses:
RapaEnv

public class BasicNamingContext
extends NamingContext

Basic implementation of a naming context. This maps only based upon the name and performs no special processing for that name.

See Also:
Call, GreenDefinitions

Inner classes inherited from class uk.ac.man.cs.rainbow.rapa.NamingContext
NamingContext.Mapping
 
Fields inherited from class uk.ac.man.cs.rainbow.rapa.NamingContext
initial, parent
 
Constructor Summary
BasicNamingContext(NamingContext parent)
           
 
Method Summary
protected  String append(StringBuffer sb, String separator)
          Append each mapping supported by this naming context to the string buffer, preceded by the separator.
 NamingContext.Mapping get(String name, Argument[] parameters)
          Get the definition for the given named process call.
 void put(NamingContext.Mapping definition)
           
 void put(String name, Argument[] parameters, Channel[] inputs, Channel[] outputs, ProcessTerm body)
           
 
Methods inherited from class uk.ac.man.cs.rainbow.rapa.NamingContext
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicNamingContext

public BasicNamingContext(NamingContext parent)
Method Detail

get

public NamingContext.Mapping get(String name,
                                 Argument[] parameters)
Description copied from class: NamingContext
Get the definition for the given named process call.
Overrides:
get in class NamingContext
Following copied from class: uk.ac.man.cs.rainbow.rapa.NamingContext
Parameters:
name - What the process definition is called.
parameters - The parameters that will be passed to the process (needed for the correct handling of some Green constructs.)

put

public void put(NamingContext.Mapping definition)

put

public void put(String name,
                Argument[] parameters,
                Channel[] inputs,
                Channel[] outputs,
                ProcessTerm body)

append

protected String append(StringBuffer sb,
                        String separator)
Description copied from class: NamingContext
Append each mapping supported by this naming context to the string buffer, preceded by the separator.
Overrides:
append in class NamingContext
Following copied from class: uk.ac.man.cs.rainbow.rapa.NamingContext
Parameters:
sb - The string buffer to append to.
separator - A newline except at the very start of the printing of a mapping list, when it is an empty string.
Returns:
The separator to use for the parent naming context.
See Also:
append(StringBuffer,String), NamingContext.toString()