public class CompositePackage extends Package
autoloadTable, exportedSymbols, exports, globalPackage, initialized, name, packages, parent, providedModuleNames, requiredModuleNames, root, usedAsModule
Constructor and Description |
---|
CompositePackage() |
CompositePackage(Package base)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.Enumeration |
bindings()
Returns an enumeration of the NamedValues in the symbol table.
|
void |
clear()
Deletes all name-value bindings.
|
java.lang.Object |
get(java.lang.String interned)
Gets the value of a variable.
|
Package |
getBasePackage()
Gets the base package
|
java.util.Enumeration |
keys()
Returns an enumeration of the keys in the symbol table.
|
NamedValue |
lookup(java.lang.String symbol)
Looks for a name-value binding in the symbol table chain.
|
NamedValue |
lookup(java.lang.String symbol,
Context context)
First looks for the symbol in the local symbol table.
|
Package |
newInstance(java.lang.String name)
Creates a sub-package
|
void |
set(java.lang.String interned,
java.lang.Object value)
Defines a name-value binding in the symbol table.
|
void |
setConstant(java.lang.String interned,
java.lang.Object value)
Defines a constant in the symbol table.
|
int |
size() |
java.util.Enumeration |
values()
Returns an enumeration of the values in the symbol table.
|
addPackage, asMap, autoload, autoload, clear, clone, defined, elements, export, find, find, get, getGlobalPackage, getName, getPackage, getPackage, getParent, init, initializeModule, lookupRecursively, remove, remove, removePackage, set, toString, wrap
public CompositePackage()
public CompositePackage(Package base)
base
- the base packagepublic Package newInstance(java.lang.String name)
newInstance
in class Package
name
- the name of the sub-packagepublic Package getBasePackage()
public NamedValue lookup(java.lang.String symbol, Context context)
public NamedValue lookup(java.lang.String symbol)
symbol
- the name of the variable, which must be intern'dpublic java.lang.Object get(java.lang.String interned)
interned
- the name of the variable, which must be intern'dpublic void set(java.lang.String interned, java.lang.Object value)
interned
- the name of the variable, which must be intern'dvalue
- the new valuejava.lang.IllegalStateException
- thrown when the specified symbol has been defined as a
constant.public void setConstant(java.lang.String interned, java.lang.Object value)
interned
- the name of the variable, which must be intern'dvalue
- the constant valuejava.lang.IllegalStateException
- thrown when the specified symbol has been defined as a
constantpublic void clear()
public int size()
public java.util.Enumeration bindings()
NamedValue
public java.util.Enumeration keys()
public java.util.Enumeration values()