All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pnuts.lang.Context

pnuts.lang.Context

public class Context
implements Property
Context represents an internal state in Pnuts runtime environment. A Context object contains the following information.

Note that the name space is shared by all contexts.


Constructor Index

 o Context()
Create a new context
 o Context(Package)
Creates a context.
 o Context(String)
Creates a context.

Method Index

 o clone()
Make a clone of the context
 o defined(String)
 o get(String)
 o getCurrentPackage()
get the current package
 o getErrorStream()
get error-output-stream of the context
 o getOutputStream()
get output stream of the context
 o getTerminalStream()
get terminal-output-stream of the context
 o set(String, Object)
 o setErrorStream(OutputStream)
 o setErrorStream(OutputStream, boolean)
set error-output-stream of the context
 o setErrorStream(Writer)
 o setErrorStream(Writer, boolean)
 o setOutputStream(OutputStream)
 o setOutputStream(OutputStream, boolean)
set output stream of the context
 o setOutputStream(Writer)
 o setOutputStream(Writer, boolean)
 o setTerminalStream(OutputStream)
 o setTerminalStream(OutputStream, boolean)
set terminal-output-stream of the context
 o setTerminalStream(Writer)
 o setTerminalStream(Writer, boolean)

Constructors

 o Context
 public Context()
Create a new context

 o Context
 public Context(String pkg)
Creates a context.

Parameters:
pkg - the name of the package.
 o Context
 public Context(Package pkg)
Creates a context.

Parameters:
pkg - the initial package of the context.

Methods

 o clone
 public Object clone()
Make a clone of the context

 o setOutputStream
 public void setOutputStream(OutputStream outputStream,
                             boolean autoFlush)
set output stream of the context

 o setOutputStream
 public void setOutputStream(OutputStream outputStream)
 o setOutputStream
 public void setOutputStream(Writer outputWriter,
                             boolean autoFlush)
 o setOutputStream
 public void setOutputStream(Writer outputWriter)
 o getOutputStream
 public ConsoleOutputStream getOutputStream()
get output stream of the context

 o setTerminalStream
 public void setTerminalStream(OutputStream terminalStream,
                               boolean autoFlush)
set terminal-output-stream of the context

 o setTerminalStream
 public void setTerminalStream(OutputStream terminalStream)
 o setTerminalStream
 public void setTerminalStream(Writer terminalWriter,
                               boolean autoFlush)
 o setTerminalStream
 public void setTerminalStream(Writer terminalWriter)
 o getTerminalStream
 public ConsoleOutputStream getTerminalStream()
get terminal-output-stream of the context

 o setErrorStream
 public void setErrorStream(OutputStream errorStream,
                            boolean autoFlush)
set error-output-stream of the context

 o setErrorStream
 public void setErrorStream(OutputStream errorStream)
 o setErrorStream
 public void setErrorStream(Writer errorWriter,
                            boolean autoFlush)
 o setErrorStream
 public void setErrorStream(Writer errorWriter)
 o getErrorStream
 public ConsoleOutputStream getErrorStream()
get error-output-stream of the context

 o getCurrentPackage
 public Package getCurrentPackage()
get the current package

 o set
 public void set(String symbol,
                 Object obj)
 o get
 public Object get(String symbol)
 o defined
 public boolean defined(String symbol)

All Packages  Class Hierarchy  This Package  Previous  Next  Index