| java.lang.Object org.openlaszlo.cache.Cache org.openlaszlo.sc.ScriptCompiler
ScriptCompiler | public class ScriptCompiler extends Cache (Code) | | Utility class for compiling scripts, translating Java objects
(maps, lists, and strings) to source expressions for the
corresponding JavaScript object.
author: Oliver Steele |
Method Summary | |
public static boolean | clearCacheStatic() | public static void | compile(String script, File outfile, int swfversion) Compiles the ActionScript in script to a new movie in the swf
file named by outfile. | public static void | compile(String script, OutputStream ostream, int swfversion) Compile the ActionScript in script to a movie, that's written
to output. | public static byte[] | compileToByteArray(String script, Properties properties) | public static ScriptCompiler | getScriptCompilerCache() | static char | hexchar(int c) | public static synchronized ScriptCompiler | initScriptCompilerCache(File cacheDirectory, Properties initprops) | public static boolean | isIdentifier(String s) Returns true iff the string is a valid JavaScript identifier. | public static String | quote(String s) Enclose the specified string in double-quotes, and character-quote
any characters that need it. | static String | sortedPropertiesList(Properties props) | public static void | writeObject(Object object, java.io.Writer writer) Writes a LaszloScript expression that evaluates to a
LaszloScript representation of the object. | public static void | writeScriptToStream(byte[] action, OutputStream ostream, int swfversion) |
SCRIPT_CACHE_NAME | final public static String SCRIPT_CACHE_NAME(Code) | | |
clearCacheStatic | public static boolean clearCacheStatic()(Code) | | |
compile | public static void compile(String script, File outfile, int swfversion) throws IOException(Code) | | Compiles the ActionScript in script to a new movie in the swf
file named by outfile.
Parameters: script - a String value Parameters: outfile - a File value |
compile | public static void compile(String script, OutputStream ostream, int swfversion) throws IOException(Code) | | Compile the ActionScript in script to a movie, that's written
to output.
Parameters: script - a String value Parameters: ostream - an OutputStream value |
compileToByteArray | public static byte[] compileToByteArray(String script, Properties properties)(Code) | | Compiles the specified script into bytecode
Parameters: script - a script an array containing the bytecode |
hexchar | static char hexchar(int c)(Code) | | |
isIdentifier | public static boolean isIdentifier(String s)(Code) | | Returns true iff the string is a valid JavaScript identifier.
|
quote | public static String quote(String s)(Code) | | Enclose the specified string in double-quotes, and character-quote
any characters that need it.
Parameters: s - a string a quoted string |
sortedPropertiesList | static String sortedPropertiesList(Properties props)(Code) | | a cache key for the given properties |
writeScriptToStream | public static void writeScriptToStream(byte[] action, OutputStream ostream, int swfversion) throws IOException(Code) | | Parameters: action - actionscript byte codes Parameters: ostream - outputstream to write SWF |
|
|