All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pnuts.lang.Package

pnuts.lang.Package

public class Package
implements Property
This class represents a Pnuts package (not Java's).


Variable Index

 o autoloadTable
 o children
 o globalPackage
 o name
 o packages
 o parent
 o table
 o unitTable

Constructor Index

 o Package(String)

Method Index

 o clear(String)
 o defined(String)
 o elements()
enumerates sub-packages
 o find(String)
 o get(String)
 o getGlobalPackage()
 o getName()
 o getPackage(String)
If package "pkg" exists returns that, otherwise creates and returns one.
 o keys()
 o remove(String)
remove the specified package
 o save(OutputStream)
save the package to an outputStream.
 o set(String, Object)
 o toString()

Variables

 o name
 protected String name
 o table
 protected transient Hashtable table
 o children
 protected transient Vector children
 o parent
 protected transient Package parent
 o globalPackage
 protected static Package globalPackage
 o packages
 protected static Hashtable packages
 o autoloadTable
 protected Hashtable autoloadTable
 o unitTable
 protected Hashtable unitTable

Constructors

 o Package
 protected Package(String name)

Methods

 o getGlobalPackage
 public static Package getGlobalPackage()
Returns:
the global package
 o getPackage
 public static Package getPackage(String pkg)
If package "pkg" exists returns that, otherwise creates and returns one.

 o defined
 public boolean defined(String sym)
Returns:
true if sym is defined in the current package.
 o get
 public Object get(String sym)
Returns:
the value of specified variable in the current package.
 o set
 public void set(String sym,
                 Object obj)
Parameters:
sym - a name of variable
obj - the value of the variable
 o clear
 public void clear(String sym)
Parameters:
sym - a name of variable to be deleted
 o remove
 public static void remove(String name)
remove the specified package

 o find
 public static Package find(String pkg)
Parameters:
pkg - a name of package to look
Returns:
a package with name "pkg" if it exits.
 o getName
 public String getName()
Returns:
the name of the package
 o keys
 public Enumeration keys()
 o save
 public void save(OutputStream s)
save the package to an outputStream. If a value of a symbol can not be serialized, the symbol is ignored.

 o elements
 public Enumeration elements()
enumerates sub-packages

 o toString
 public String toString()

All Packages  Class Hierarchy  This Package  Previous  Next  Index