com.gargoylesoftware.htmlunit.javascript
Class MethodWrapper

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.MethodWrapper
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.Callable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Function, org.mozilla.javascript.Scriptable

public class MethodWrapper
extends org.mozilla.javascript.ScriptableObject
implements org.mozilla.javascript.Function

Wraps a java method to make it available as a javascript function (more flexible than Rhino's FunctionObject.

Version:
$Revision: 1.3 $
Author:
Marc Guillemot
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
 
Method Summary
 java.lang.Object call(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args)
  
 org.mozilla.javascript.Scriptable construct(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable scope, java.lang.Object[] args)
  
 java.lang.String getClassName()
  
 
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, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, 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
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, get, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Method Detail

call

public java.lang.Object call(org.mozilla.javascript.Context context,
                             org.mozilla.javascript.Scriptable scope,
                             org.mozilla.javascript.Scriptable thisObj,
                             java.lang.Object[] args)
Specified by:
call in interface org.mozilla.javascript.Callable
Specified by:
call in interface org.mozilla.javascript.Function
See Also:
{@inheritDoc}

construct

public org.mozilla.javascript.Scriptable construct(org.mozilla.javascript.Context context,
                                                   org.mozilla.javascript.Scriptable scope,
                                                   java.lang.Object[] args)
Specified by:
construct in interface org.mozilla.javascript.Function
See Also:
{@inheritDoc}

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject
Returns:
a name based on the method name
See Also:
ScriptableObject.getClassName()


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.