pnuts.ext
Class SecurePnutsImpl
java.lang.Object
|
+--pnuts.lang.PnutsImpl
|
+--pnuts.ext.SecurePnutsImpl
- public class SecurePnutsImpl
- extends PnutsImpl
A PnutsImpl subclass that execute scripts in an access control context in
Java2 Security.
e.g.
context.setPnutsImpl(new SecurePnutsImpl(new CompilerPnutsImpl()));
|
Method Summary |
java.lang.Object |
accept(SimpleNode node,
Context context)
Evaluate a parsed script |
java.lang.Object |
eval(java.lang.String expr,
Context context)
Evaluate an expreesion |
java.lang.Object |
load(java.net.URL scriptURL,
Context context)
Load a script file from a URL |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
SecurePnutsImpl
public SecurePnutsImpl(PnutsImpl impl)
- A Constructor
- Parameters:
impl - a PnutsImpl object
SecurePnutsImpl
public SecurePnutsImpl(PnutsImpl impl,
java.security.CodeSource codeSource)
- A Constructor
- Parameters:
impl - codeSource - a CodeSource object which indicates the source of the expression
execute by eval(String, Context).
eval
public java.lang.Object eval(java.lang.String expr,
Context context)
- Evaluate an expreesion
- Overrides:
- eval in class PnutsImpl
- Parameters:
expr - the expression to be evaluatedcontext - the context in which the expression is evaluated- Returns:
- the result of the evaluation
accept
public java.lang.Object accept(SimpleNode node,
Context context)
- Evaluate a parsed script
- Overrides:
- accept in class PnutsImpl
- Parameters:
node - the parsed scriptcontext - the context in which the script is evaluated- Returns:
- the result of the evaluation
load
public java.lang.Object load(java.net.URL scriptURL,
Context context)
- Load a script file from a URL
- Overrides:
- load in class PnutsImpl
- Parameters:
scriptURL - the URL of the scriptcontext - the context in which the script is executed
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object