|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.ScriptableWrapper
public class ScriptableWrapper
Simple wrapper to make "normal" object scriptable according to specific configuration and allowing use of index properties. TODO: Configuration of the properties and functions should occur from the xml configuration according to the browser to simulate.
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 | |
---|---|
ScriptableWrapper(org.mozilla.javascript.Scriptable scope,
java.lang.Object javaObject,
java.lang.Class staticType)
Constructs a wrapper for the java object. |
Method Summary | |
---|---|
java.lang.Object |
get(int index,
org.mozilla.javascript.Scriptable start)
|
java.lang.Object |
get(java.lang.String name,
org.mozilla.javascript.Scriptable start)
|
java.lang.String |
getClassName()
|
java.lang.Object |
getDefaultValue(java.lang.Class hint)
|
java.lang.Object |
getWrappedObject()
Gets the java object made availabe to javascript through this wrapper |
boolean |
has(java.lang.String name,
org.mozilla.javascript.Scriptable start)
|
java.lang.String |
jsToString()
To use as "toString" function in javascript |
Methods inherited from class org.mozilla.javascript.ScriptableObject |
---|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptableWrapper(org.mozilla.javascript.Scriptable scope, java.lang.Object javaObject, java.lang.Class staticType)
scope
- the scope of the executing scriptjavaObject
- the javaObject to wrapstaticType
- the static type of the objectMethod Detail |
---|
public java.lang.Object get(int index, org.mozilla.javascript.Scriptable start)
get
in interface org.mozilla.javascript.Scriptable
get
in class org.mozilla.javascript.ScriptableObject
ScriptableObject.get(int, org.mozilla.javascript.Scriptable)
public java.lang.Object get(java.lang.String name, org.mozilla.javascript.Scriptable start)
get
in interface org.mozilla.javascript.Scriptable
get
in class org.mozilla.javascript.ScriptableObject
ScriptableObject.get(java.lang.String, org.mozilla.javascript.Scriptable)
public java.lang.String getClassName()
getClassName
in interface org.mozilla.javascript.Scriptable
getClassName
in class org.mozilla.javascript.ScriptableObject
ScriptableObject.getClassName()
public java.lang.Object getDefaultValue(java.lang.Class hint)
getDefaultValue
in interface org.mozilla.javascript.Scriptable
getDefaultValue
in class org.mozilla.javascript.ScriptableObject
ScriptableObject.getDefaultValue(java.lang.Class)
public java.lang.Object getWrappedObject()
public boolean has(java.lang.String name, org.mozilla.javascript.Scriptable start)
has
in interface org.mozilla.javascript.Scriptable
has
in class org.mozilla.javascript.ScriptableObject
ScriptableObject.has(java.lang.String,
org.mozilla.javascript.Scriptable)
public java.lang.String jsToString()
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |