com.voltvoodoo.brew
Class RhinoRunner

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.voltvoodoo.brew.RhinoRunner
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class RhinoRunner
extends org.mozilla.javascript.ScriptableObject

The BasicRhinoShell program. Can execute scripts interactively or in batch mode at the command line. An example of controlling the JavaScript engine.

Author:
Norris Boyd
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
RhinoRunner()
           
 
Method Summary
static void exec(java.lang.String[] includes, java.lang.String mainScript, java.lang.Object[] args, java.util.Map<java.lang.String,java.lang.Object> globalVariables, org.mozilla.javascript.ErrorReporter reporter)
           
 java.lang.String getClassName()
           
 java.io.InputStream getResourceAsStream(java.lang.String path)
           
static void load(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)
          Load and execute a set of JavaScript source files.
static void print(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)
          Print the string values of its arguments.
 java.lang.String readFile(java.lang.String path)
          This method is defined as a JavaScript function.
static void warn(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function funObj)
           
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, equivalentValues, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RhinoRunner

public RhinoRunner()
Method Detail

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject

exec

public static void exec(java.lang.String[] includes,
                        java.lang.String mainScript,
                        java.lang.Object[] args,
                        java.util.Map<java.lang.String,java.lang.Object> globalVariables,
                        org.mozilla.javascript.ErrorReporter reporter)

print

public static void print(org.mozilla.javascript.Context cx,
                         org.mozilla.javascript.Scriptable thisObj,
                         java.lang.Object[] args,
                         org.mozilla.javascript.Function funObj)
Print the string values of its arguments. This method is defined as a JavaScript function. Note that its arguments are of the "varargs" form, which allows it to handle an arbitrary number of arguments supplied to the JavaScript function.


warn

public static void warn(org.mozilla.javascript.Context cx,
                        org.mozilla.javascript.Scriptable thisObj,
                        java.lang.Object[] args,
                        org.mozilla.javascript.Function funObj)

readFile

public java.lang.String readFile(java.lang.String path)
This method is defined as a JavaScript function.


load

public static void load(org.mozilla.javascript.Context cx,
                        org.mozilla.javascript.Scriptable thisObj,
                        java.lang.Object[] args,
                        org.mozilla.javascript.Function funObj)
Load and execute a set of JavaScript source files. This method is defined as a JavaScript function.


getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String path)


Copyright © 2011 FuseSource. All Rights Reserved.