|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpnuts.lang.Package
pnuts.security.SecurePackage
public class SecurePackage
Package that can control add/write/read operation in a security context.
pnuts -J-Djava.security.manager "-J-Dpnuts.package.factory=pnuts.security.SecurePackage\$Factory" scripts
Field Summary |
---|
Fields inherited from class pnuts.lang.Package |
---|
autoloadTable, exportedSymbols, exports, globalPackage, initialized, name, packages, parent, providedModuleNames, requiredModuleNames, root, usedAsModule |
Constructor Summary | |
---|---|
SecurePackage(java.lang.String name,
Package parent)
|
Method Summary | |
---|---|
protected void |
addPackage(Package pkg,
Context context)
|
java.util.Enumeration |
bindings()
Returns an enumeration of the NamedValues in the symbol table. |
void |
clear()
Deletes all name-value bindings. |
void |
clear(java.lang.String symbol,
Context context)
Deletes a symbol from the package. |
java.lang.Object |
get(java.lang.String interned)
Gets the value of a variable. |
java.util.Enumeration |
keys()
Returns an enumeration of the keys in the symbol table. |
NamedValue |
lookup(java.lang.String interned)
Looks for a name-value binding in the symbol table chain. |
protected void |
removePackage(Package pkg,
Context context)
|
void |
set(java.lang.String interned,
java.lang.Object value)
Defines a name-value binding in the symbol table. |
void |
set(java.lang.String symbol,
java.lang.Object obj,
Context context)
Set a value of a symbol in the package. |
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. |
Methods inherited from class pnuts.lang.Package |
---|
asMap, autoload, autoload, clone, defined, elements, export, find, find, get, getGlobalPackage, getName, getPackage, getPackage, getParent, init, initializeModule, lookup, lookupRecursively, newInstance, remove, remove, toString, wrap |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SecurePackage(java.lang.String name, Package parent)
Method Detail |
---|
protected void addPackage(Package pkg, Context context)
addPackage
in class Package
public void set(java.lang.String symbol, java.lang.Object obj, Context context)
Package
set
in interface Property
set
in class Package
symbol
- an interned name of variableobj
- the value of the variablecontext
- the context in which the expression is evaluated.public void clear(java.lang.String symbol, Context context)
Package
clear
in class Package
symbol
- a name of variable to be deletedprotected void removePackage(Package pkg, Context context)
removePackage
in class Package
public java.lang.Object get(java.lang.String interned)
interned
- the name of the variable, which must be intern'd
public NamedValue lookup(java.lang.String interned)
interned
- the name of the variable, which must be intern'd
public void set(java.lang.String interned, java.lang.Object value)
interned
- the name of the variable, which must be intern'dvalue
- the new value
java.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 value
java.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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |