org.mozilla.javascript
Class JavaAdapter
java.lang.Object
|
+--org.mozilla.javascript.ScriptableObject
|
+--org.mozilla.javascript.JavaAdapter
- All Implemented Interfaces:
- Scriptable, java.io.Serializable
- public class JavaAdapter
- extends ScriptableObject
- See Also:
- Serialized Form
Method Summary |
static java.lang.Object |
callMethod(Scriptable object,
java.lang.Object thisObj,
java.lang.String methodId,
java.lang.Object[] args)
Utility method which dynamically binds a Context to the current thread,
if none already exists. |
static java.lang.Object |
convertResult(java.lang.Object result,
java.lang.String classname)
|
static java.lang.Object |
createAdapterClass(java.lang.Class superClass,
java.lang.Class[] interfaces,
Scriptable obj,
Scriptable self)
|
static java.lang.Class |
createAdapterClass(Context cx,
Scriptable jsObj,
java.lang.String adapterName,
java.lang.Class superClass,
java.lang.Class[] interfaces,
java.lang.String scriptClassName,
ClassNameHelper nameHelper)
|
boolean |
equals(java.lang.Object obj)
|
static java.lang.Object |
getAdapterSelf(java.lang.Class adapterClass,
java.lang.Object adapter)
|
java.lang.String |
getClassName()
Return the name of the class.
|
static java.lang.Object |
jsConstructor(Context cx,
java.lang.Object[] args,
Function ctorObj,
boolean inNewExpr)
|
static Scriptable |
setAdapterProto(Scriptable obj,
java.lang.Object adapter)
|
static Scriptable |
toObject(java.lang.Object value,
Scriptable scope,
java.lang.Class staticType)
|
Methods inherited from class org.mozilla.javascript.ScriptableObject |
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setParentScope, setPrototype |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaAdapter
public JavaAdapter()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
getClassName
public java.lang.String getClassName()
- Description copied from class:
ScriptableObject
- Return the name of the class.
This is typically the same name as the constructor.
Classes extending ScriptableObject must implement this abstract
method.
- Overrides:
getClassName
in class ScriptableObject
convertResult
public static java.lang.Object convertResult(java.lang.Object result,
java.lang.String classname)
throws java.lang.ClassNotFoundException
setAdapterProto
public static Scriptable setAdapterProto(Scriptable obj,
java.lang.Object adapter)
getAdapterSelf
public static java.lang.Object getAdapterSelf(java.lang.Class adapterClass,
java.lang.Object adapter)
throws java.lang.NoSuchFieldException,
java.lang.IllegalAccessException
jsConstructor
public static java.lang.Object jsConstructor(Context cx,
java.lang.Object[] args,
Function ctorObj,
boolean inNewExpr)
throws java.lang.InstantiationException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.ClassNotFoundException,
java.lang.NoSuchFieldException
createAdapterClass
public static java.lang.Object createAdapterClass(java.lang.Class superClass,
java.lang.Class[] interfaces,
Scriptable obj,
Scriptable self)
throws java.lang.ClassNotFoundException
createAdapterClass
public static java.lang.Class createAdapterClass(Context cx,
Scriptable jsObj,
java.lang.String adapterName,
java.lang.Class superClass,
java.lang.Class[] interfaces,
java.lang.String scriptClassName,
ClassNameHelper nameHelper)
throws java.lang.ClassNotFoundException
callMethod
public static java.lang.Object callMethod(Scriptable object,
java.lang.Object thisObj,
java.lang.String methodId,
java.lang.Object[] args)
- Utility method which dynamically binds a Context to the current thread,
if none already exists.
toObject
public static Scriptable toObject(java.lang.Object value,
Scriptable scope,
java.lang.Class staticType)