|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mozilla.javascript.ScriptableObject
org.mozilla.javascript.ImporterTopLevel
ru.biosoft.plugins.javascript.Global
| Field Summary | |
protected static org.apache.log4j.Category |
log
|
static java.lang.String |
QUIT
|
| Fields inherited from class org.mozilla.javascript.ScriptableObject |
DONTENUM, EMPTY, parent, PERMANENT, prototype, READONLY |
| Fields inherited from interface org.mozilla.javascript.Scriptable |
NOT_FOUND |
| Constructor Summary | |
Global()
|
|
| Method Summary | |
static void |
defineClass(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Load a Java class that defines a JavaScript object using the conventions outlined in ScriptableObject.defineClass. |
static java.lang.Object |
deserialize(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Restore from the specified file an object previously written by a call to serialize. |
static java.lang.Object |
help(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Returns description for the specified JavaScript function or host object. |
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 |
loadClass(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Load and execute a script compiled to a class file. |
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. |
static java.lang.String |
quit()
Quit the shell. |
static void |
serialize(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Serialize the given object to the specified file. |
static double |
version(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
Get and set the language version. |
| Methods inherited from class org.mozilla.javascript.ImporterTopLevel |
get, getClassName, has, importClass, importPackage |
| Methods inherited from class org.mozilla.javascript.ScriptableObject |
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, getAllIds, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setParentScope, setPrototype |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String QUIT
protected static org.apache.log4j.Category log
| Constructor Detail |
public Global()
| Method Detail |
public static java.lang.Object help(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
public static void print(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
public static java.lang.String quit()
public static double version(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
public static void load(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
public static void defineClass(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException,
org.mozilla.javascript.ClassDefinitionException,
org.mozilla.javascript.PropertyException
java.lang.IllegalAccessException - if access is not available
to a reflected class member
java.lang.InstantiationException - if unable to instantiate
the named class
java.lang.reflect.InvocationTargetException - if an exception is thrown
during execution of methods of the named class
org.mozilla.javascript.ClassDefinitionException - if the format of the
class causes this exception in ScriptableObject.defineClass
org.mozilla.javascript.PropertyException - if the format of the
class causes this exception in ScriptableObject.defineClassScriptableObject.defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)
public static void loadClass(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException,
org.mozilla.javascript.JavaScriptException
When called as a JavaScript function, a single argument is expected. This argument should be the name of a class that implements the Script interface, as will any script compiled by jsc.
java.lang.IllegalAccessException - if access is not available
to the class
java.lang.InstantiationException - if unable to instantiate
the named class
java.lang.reflect.InvocationTargetException - if an exception is thrown
during execution of methods of the named class
org.mozilla.javascript.JavaScriptException - if a JavaScript exception is thrown
during execution of the compiled scriptScriptableObject.defineClass(org.mozilla.javascript.Scriptable, java.lang.Class)
public static void serialize(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
throws java.io.IOException
java.io.IOException
public static java.lang.Object deserialize(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function funObj)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||