Module org.htmlunit

Class FunctionWrapper

java.lang.Object
org.htmlunit.javascript.FunctionWrapper
All Implemented Interfaces:
Serializable, org.htmlunit.corejs.javascript.Callable, org.htmlunit.corejs.javascript.Constructable, org.htmlunit.corejs.javascript.Function, org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class FunctionWrapper extends Object implements org.htmlunit.corejs.javascript.Function, org.htmlunit.corejs.javascript.SymbolScriptable, Serializable
Wrapper for a Function delegating all calls to the wrapped instance.
Author:
Marc Guillemot, Ahmed Ashour, Ronald Brill, Lai Quang Duong
See Also:
  • Field Summary

    Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable

    NOT_FOUND
  • Constructor Summary

    Constructors
    Constructor
    Description
    FunctionWrapper(org.htmlunit.corejs.javascript.Function wrapped)
    Constructs a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    call(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args)
    org.htmlunit.corejs.javascript.Scriptable
    construct(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, Object[] args)
    void
    delete(int index)
    void
    delete(String name)
    void
    delete(org.htmlunit.corejs.javascript.Symbol key)
    get(int index, org.htmlunit.corejs.javascript.Scriptable start)
    get(String name, org.htmlunit.corejs.javascript.Scriptable start)
    get(org.htmlunit.corejs.javascript.Symbol key, org.htmlunit.corejs.javascript.Scriptable start)
    org.htmlunit.corejs.javascript.VarScope
    org.htmlunit.corejs.javascript.Scriptable
    boolean
    has(int index, org.htmlunit.corejs.javascript.Scriptable start)
    boolean
    has(String name, org.htmlunit.corejs.javascript.Scriptable start)
    boolean
    has(org.htmlunit.corejs.javascript.Symbol key, org.htmlunit.corejs.javascript.Scriptable start)
    boolean
    hasInstance(org.htmlunit.corejs.javascript.Scriptable instance)
    void
    put(int index, org.htmlunit.corejs.javascript.Scriptable start, Object value)
    void
    put(String name, org.htmlunit.corejs.javascript.Scriptable start, Object value)
    void
    put(org.htmlunit.corejs.javascript.Symbol key, org.htmlunit.corejs.javascript.Scriptable start, Object value)
    void
    setParentScope(org.htmlunit.corejs.javascript.VarScope scope)
    void
    setPrototype(org.htmlunit.corejs.javascript.Scriptable prototype)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.htmlunit.corejs.javascript.Function

    getDeclarationScope, isConstructor

    Methods inherited from interface org.htmlunit.corejs.javascript.Scriptable

    getAncestor
  • Constructor Details

    • FunctionWrapper

      public FunctionWrapper(org.htmlunit.corejs.javascript.Function wrapped)
      Constructs a new instance.
      Parameters:
      wrapped - the wrapped function
  • Method Details

    • call

      public Object call(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args)
      Specified by:
      call in interface org.htmlunit.corejs.javascript.Callable
      Specified by:
      call in interface org.htmlunit.corejs.javascript.Function
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface org.htmlunit.corejs.javascript.Scriptable
    • construct

      public org.htmlunit.corejs.javascript.Scriptable construct(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, Object[] args)
      Specified by:
      construct in interface org.htmlunit.corejs.javascript.Constructable
      Specified by:
      construct in interface org.htmlunit.corejs.javascript.Function
    • get

      public Object get(String name, org.htmlunit.corejs.javascript.Scriptable start)
      Specified by:
      get in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      get in interface org.htmlunit.corejs.javascript.Scriptable
    • get

      public Object get(int index, org.htmlunit.corejs.javascript.Scriptable start)
      Specified by:
      get in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      get in interface org.htmlunit.corejs.javascript.Scriptable
    • get

      public Object get(org.htmlunit.corejs.javascript.Symbol key, org.htmlunit.corejs.javascript.Scriptable start)
      Specified by:
      get in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      get in interface org.htmlunit.corejs.javascript.Scriptable
      Specified by:
      get in interface org.htmlunit.corejs.javascript.SymbolScriptable
    • has

      public boolean has(String name, org.htmlunit.corejs.javascript.Scriptable start)
      Specified by:
      has in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      has in interface org.htmlunit.corejs.javascript.Scriptable
    • has

      public boolean has(int index, org.htmlunit.corejs.javascript.Scriptable start)
      Specified by:
      has in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      has in interface org.htmlunit.corejs.javascript.Scriptable
    • has

      public boolean has(org.htmlunit.corejs.javascript.Symbol key, org.htmlunit.corejs.javascript.Scriptable start)
      Specified by:
      has in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      has in interface org.htmlunit.corejs.javascript.Scriptable
      Specified by:
      has in interface org.htmlunit.corejs.javascript.SymbolScriptable
    • put

      public void put(String name, org.htmlunit.corejs.javascript.Scriptable start, Object value)
      Specified by:
      put in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      put in interface org.htmlunit.corejs.javascript.Scriptable
    • put

      public void put(int index, org.htmlunit.corejs.javascript.Scriptable start, Object value)
      Specified by:
      put in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      put in interface org.htmlunit.corejs.javascript.Scriptable
    • put

      public void put(org.htmlunit.corejs.javascript.Symbol key, org.htmlunit.corejs.javascript.Scriptable start, Object value)
      Specified by:
      put in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      put in interface org.htmlunit.corejs.javascript.Scriptable
      Specified by:
      put in interface org.htmlunit.corejs.javascript.SymbolScriptable
    • delete

      public void delete(String name)
      Specified by:
      delete in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      delete in interface org.htmlunit.corejs.javascript.Scriptable
    • delete

      public void delete(int index)
      Specified by:
      delete in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      delete in interface org.htmlunit.corejs.javascript.Scriptable
    • delete

      public void delete(org.htmlunit.corejs.javascript.Symbol key)
      Specified by:
      delete in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      delete in interface org.htmlunit.corejs.javascript.Scriptable
      Specified by:
      delete in interface org.htmlunit.corejs.javascript.SymbolScriptable
    • getPrototype

      public org.htmlunit.corejs.javascript.Scriptable getPrototype()
      Specified by:
      getPrototype in interface org.htmlunit.corejs.javascript.Scriptable
    • setPrototype

      public void setPrototype(org.htmlunit.corejs.javascript.Scriptable prototype)
      Specified by:
      setPrototype in interface org.htmlunit.corejs.javascript.Scriptable
    • getParentScope

      public org.htmlunit.corejs.javascript.VarScope getParentScope()
      Specified by:
      getParentScope in interface org.htmlunit.corejs.javascript.Scriptable
    • setParentScope

      public void setParentScope(org.htmlunit.corejs.javascript.VarScope scope)
      Specified by:
      setParentScope in interface org.htmlunit.corejs.javascript.Scriptable
    • getIds

      public Object[] getIds()
      Specified by:
      getIds in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      getIds in interface org.htmlunit.corejs.javascript.Scriptable
    • getDefaultValue

      public Object getDefaultValue(Class<?> hint)
      Specified by:
      getDefaultValue in interface org.htmlunit.corejs.javascript.Scriptable
    • hasInstance

      public boolean hasInstance(org.htmlunit.corejs.javascript.Scriptable instance)
      Specified by:
      hasInstance in interface org.htmlunit.corejs.javascript.Scriptable