| java.lang.Object pnuts.lang.Pnuts pnuts.ext.CachedScript
All known Subclasses: pnuts.servlet.DynamicPage,
CachedScript | public class CachedScript extends Pnuts (Code) | | Executable script that is automatically recompiled
|
Constructor Summary | |
public | CachedScript(URL scriptURL) | public | CachedScript(URL scriptURL, String encoding, Context context) Constructor
Parameters: scriptURL - the URL of the script Parameters: encoding - the character encoding of the script. |
parsedTime | protected long parsedTime(Code) | | |
CachedScript | public CachedScript(URL scriptURL, String encoding, Context context) throws IOException, ParseException(Code) | | Constructor
Parameters: scriptURL - the URL of the script Parameters: encoding - the character encoding of the script. If null, the default encoding is used. Parameters: context - the context in which the script is first parsed/compiled. |
getCompiler | protected Compiler getCompiler()(Code) | | Returns a compiler. If this method returns null,
script won't be compiled.
|
lastModified | static long lastModified(URL scriptURL)(Code) | | |
needToUpdate | protected boolean needToUpdate()(Code) | | Determin if the script should be recompiled
true if the script should be recompiled |
update | protected void update(Context context) throws IOException, ParseException(Code) | | Parse/compile the script and update the timestamp.
Parameters: context - the context in which the script is compiled. |
Methods inherited from pnuts.lang.Pnuts | public Object accept(Visitor visitor, Context context)(Code)(Java Doc) protected Object accept(Context context)(Code)(Java Doc) public static ClassLoader createClassLoader(Context context)(Code)(Java Doc) public static ClassLoader createClassLoader(Context context, ClassLoader parent)(Code)(Java Doc) public static Object eval(String expr, Context context)(Code)(Java Doc) public static int evalDepth(Context context)(Code)(Java Doc) public static String format(Object obj)(Code)(Java Doc) public static Object get(String str)(Code)(Java Doc) public static Object get(String str, String pkg)(Code)(Java Doc) public static Properties getDefaults()(Code)(Java Doc) final public static URL getResource(String s, Context context)(Code)(Java Doc) public Object getScriptSource()(Code)(Java Doc) final public static boolean isJava2()(Code)(Java Doc) public static boolean isVerbose()(Code)(Java Doc) public static Object load(String name, Context context) throws FileNotFoundException(Code)(Java Doc) public static Object load(URL url, Context context)(Code)(Java Doc) public static Object load(InputStream in, Context context)(Code)(Java Doc) public static Object load(InputStream in, boolean interactive, Context context)(Code)(Java Doc) public static Object load(Reader reader, Context context)(Code)(Java Doc) public static Object load(Reader reader, boolean interactive, Context context)(Code)(Java Doc) final public static Class loadClass(String name, Context context) throws ClassNotFoundException(Code)(Java Doc) public static Object loadFile(String file, Context context) throws FileNotFoundException(Code)(Java Doc) public static Pnuts parse(InputStream in) throws ParseException, IOException(Code)(Java Doc) public static Pnuts parse(Reader reader) throws ParseException, IOException(Code)(Java Doc) public static Pnuts parse(Reader reader, ParseEnvironment env) throws ParseException, IOException(Code)(Java Doc) public static Pnuts parse(Reader reader, Object scriptSource, Context context) throws IOException(Code)(Java Doc) public static Pnuts parse(Reader reader, Object scriptSource, Context context, ParseEnvironment env) throws IOException(Code)(Java Doc) public static Pnuts parse(String expr) throws ParseException(Code)(Java Doc) public static void require(String file, Context context) throws FileNotFoundException(Code)(Java Doc) public static void require(String file, Context context, boolean checkForUpdate) throws FileNotFoundException(Code)(Java Doc) public Object run(Context context)(Code)(Java Doc) public static void set(String str, Object val)(Code)(Java Doc) public static void set(String str, Object val, String pkg)(Code)(Java Doc) public static void setDefaults(Properties properties)(Code)(Java Doc) public static void setPrompt(String str)(Code)(Java Doc) public void setScriptSource(Object src)(Code)(Java Doc) public static void setVerbose(boolean b)(Code)(Java Doc) public String unparse()(Code)(Java Doc) public void unparse(Writer writer) throws IOException(Code)(Java Doc)
|
|
|