| java.lang.Object java.lang.Runtime pnuts.lang.PnutsImpl pnuts.ext.CachedPnutsImpl
CachedPnutsImpl | public class CachedPnutsImpl extends PnutsImpl (Code) | | PnutsImpl which caches parsed (compiled) scripts and reuse them. This class
is useful when same scripts are executed over and over, e.g. servlet scripts.
See Also: pnuts.lang.PnutsImpl |
Inner Class :public static class ScriptCacheEntry | |
CachedPnutsImpl | public CachedPnutsImpl()(Code) | | |
CachedPnutsImpl | public CachedPnutsImpl(boolean useCompiler)(Code) | | Parameters: useCompiler - true if compiler is used (default) |
CachedPnutsImpl | public CachedPnutsImpl(boolean useCompiler, boolean useDynamicProxy, boolean includeLineNo)(Code) | | Parameters: useCompiler - true if the compiler is used (default) Parameters: useDynamicProxy - true if the compiler generates dynamic proxy. Parameters: includeLineNo - true if the compiler generates line number information. |
CachedPnutsImpl | public CachedPnutsImpl(boolean useCompiler, boolean useDynamicProxy, boolean includeLineNo, Cache cache)(Code) | | Parameters: useCompiler - true if the compiler is used (default) Parameters: useDynamicProxy - true if the compiler generates dynamic proxy. Parameters: includeLineNo - true if the compiler generates line number information. Parameters: cache - a cache object to reuse compiled code |
getCachedCode | protected ScriptCacheEntry getCachedCode(Object key)(Code) | | |
includeLineNo | public void includeLineNo(boolean flag)(Code) | | |
load | public Object load(URL scriptURL, Context context)(Code) | | Load a script file from a URL
Parameters: scriptURL - the URL of the script Parameters: context - the context in which the script is executed |
putCachedCode | protected void putCachedCode(Object key, ScriptCacheEntry entry)(Code) | | |
reset | public void reset()(Code) | | Reset the cache entries
|
Methods inherited from pnuts.lang.PnutsImpl | public Object accept(SimpleNode node, Context context)(Code)(Java Doc) protected Object acceptNode(SimpleNode node, Context context)(Code)(Java Doc) public Object eval(String expr, Context context)(Code)(Java Doc) public static PnutsImpl getDefault()(Code)(Java Doc) public Object load(String file, Context context) throws FileNotFoundException(Code)(Java Doc) public Object load(URL scriptURL, Context context)(Code)(Java Doc) public Object loadFile(String filename, Context context) throws FileNotFoundException(Code)(Java Doc) protected void popFile(Context context)(Code)(Java Doc) protected void provide(String file, Context context)(Code)(Java Doc) protected void pushFile(Object file, Context context)(Code)(Java Doc) public String queryProperty(String key)(Code)(Java Doc) protected void revoke(String file, Context context)(Code)(Java Doc) public void setProperties(Properties properties)(Code)(Java Doc) public void setProperty(String key, String value)(Code)(Java Doc)
|
|
|