org.mozilla.javascript
Class NativeJavaConstructor

java.lang.Object
  extended byorg.mozilla.javascript.ScriptableObject
      extended byorg.mozilla.javascript.IdScriptableObject
          extended byorg.mozilla.javascript.BaseFunction
              extended byorg.mozilla.javascript.NativeJavaConstructor
All Implemented Interfaces:
Callable, DebuggableObject, Function, IdFunctionCall, Scriptable, java.io.Serializable

public class NativeJavaConstructor
extends BaseFunction

This class reflects a single Java constructor into the JavaScript environment. It satisfies a request for an overloaded constructor, as introduced in LiveConnect 3. All NativeJavaConstructors behave as JSRef `bound' methods, in that they always construct the same NativeJavaClass regardless of any reparenting that may occur.

Author:
Frank Mitchell
See Also:
NativeJavaMethod, NativeJavaPackage, NativeJavaClass, Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, PERMANENT, READONLY
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
NativeJavaConstructor(org.mozilla.javascript.MemberBox ctor)
           
 
Method Summary
 java.lang.Object call(Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
          Should be overridden.
 java.lang.String getFunctionName()
           
 java.lang.String toString()
           
 
Methods inherited from class org.mozilla.javascript.BaseFunction
construct, createObject, execIdCall, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, getArity, getClassName, getClassPrototype, getInstanceIdName, getInstanceIdValue, getLength, getMaxInstanceId, hasInstance, initPrototypeId, setImmunePrototypeProperty, setInstanceIdValue
 
Methods inherited from class org.mozilla.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultPut, delete, exportAsJSClass, get, getAttributes, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeValue, instanceIdInfo, put, setAttributes
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasProperty, hasProperty, isSealed, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, get, getDefaultValue, getIds, getParentScope, getPrototype, has, has, put, put, setParentScope, setPrototype
 

Constructor Detail

NativeJavaConstructor

public NativeJavaConstructor(org.mozilla.javascript.MemberBox ctor)
Method Detail

call

public java.lang.Object call(Context cx,
                             Scriptable scope,
                             Scriptable thisObj,
                             java.lang.Object[] args)
Description copied from class: BaseFunction
Should be overridden.

Specified by:
call in interface Function
Overrides:
call in class BaseFunction

getFunctionName

public java.lang.String getFunctionName()
Overrides:
getFunctionName in class BaseFunction

toString

public java.lang.String toString()