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).
-
autoloadTable
-
-
children
-
-
globalPackage
-
-
name
-
-
packages
-
-
parent
-
-
table
-
-
unitTable
-
-
Package(String)
-
-
clear(String)
-
-
defined(String)
-
-
elements()
- enumerates sub-packages
-
find(String)
-
-
get(String)
-
-
getGlobalPackage()
-
-
getName()
-
-
getPackage(String)
- If package "pkg" exists returns that, otherwise
creates and returns one.
-
keys()
-
-
remove(String)
- remove the specified package
-
save(OutputStream)
- save the package to an outputStream.
-
set(String, Object)
-
-
toString()
-
name
protected String name
table
protected transient Hashtable table
children
protected transient Vector children
parent
protected transient Package parent
globalPackage
protected static Package globalPackage
packages
protected static Hashtable packages
autoloadTable
protected Hashtable autoloadTable
unitTable
protected Hashtable unitTable
Package
protected Package(String name)
getGlobalPackage
public static Package getGlobalPackage()
- Returns:
- the global package
getPackage
public static Package getPackage(String pkg)
- If package "pkg" exists returns that, otherwise
creates and returns one.
defined
public boolean defined(String sym)
- Returns:
- true if sym is defined in the current package.
get
public Object get(String sym)
- Returns:
- the value of specified variable in the current package.
set
public void set(String sym,
Object obj)
- Parameters:
- sym - a name of variable
- obj - the value of the variable
clear
public void clear(String sym)
- Parameters:
- sym - a name of variable to be deleted
remove
public static void remove(String name)
- remove the specified package
find
public static Package find(String pkg)
- Parameters:
- pkg - a name of package to look
- Returns:
- a package with name "pkg" if it exits.
getName
public String getName()
- Returns:
- the name of the package
keys
public Enumeration keys()
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.
elements
public Enumeration elements()
- enumerates sub-packages
toString
public String toString()
All Packages Class Hierarchy This Package Previous Next Index