Module org.htmlunit

Class PluginArray

java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.PluginArray
All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class PluginArray extends HtmlUnitScriptable
A JavaScript object for PluginArray.
Author:
Marc Guillemot, Ahmed Ashour, Ronald Brill
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction
  • Field Summary

    Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST

    Fields inherited from class org.htmlunit.corejs.javascript.SlotMapOwner

    isSealed

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

    NOT_FOUND
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final Plugin
    get(int index, org.htmlunit.corejs.javascript.Scriptable start)
    Returns the element at the specified index, or null if the index is invalid.
    protected String
    Gets the name of the plugin.
    int
    Gets the array size.
    protected Object
    Called by HtmlUnitScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype chain is searched.
    boolean
    has(String name, org.htmlunit.corejs.javascript.Scriptable start)
    .
    item(int index)
    Returns the item at the given index.
    org.htmlunit.corejs.javascript.Scriptable
     
    void
    JavaScript constructor.
    Returns the item at the given index.
    void
    refresh(boolean reloadDocuments)
    Current implementation does nothing.

    Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    applyDescriptorToAttributeBitset, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getThis, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isTrue, preventExtensions, put, put, putConst, putConstProperty, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, redefineProperty, sameValue, sealObject, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class org.htmlunit.corejs.javascript.SlotMapOwner

    associateValue, checkNotSealed, copyAssociatedValue, createSlotMap, defineProperty, defineProperty, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMaps

    Methods inherited from class java.lang.Object

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

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

    get, getIds, has

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

    get, has
  • Constructor Details

    • PluginArray

      public PluginArray()
  • Method Details

    • jsConstructor

      public void jsConstructor()
      JavaScript constructor.
    • item

      public Plugin item(int index)
      Returns the item at the given index.
      Parameters:
      index - the index
      Returns:
      the item at the given position
    • getWithPreemption

      protected Object getWithPreemption(String name)

      Called by HtmlUnitScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype chain is searched.

      IMPORTANT: This method is invoked *very* often by Rhino. If you override this method, the implementation needs to be as fast as possible!

      Overrides:
      getWithPreemption in class HtmlUnitScriptable
      Parameters:
      name - the property name
      Returns:
      Scriptable.NOT_FOUND if not found
    • 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
      Overrides:
      has in class org.htmlunit.corejs.javascript.ScriptableObject
    • get

      public final Plugin get(int index, org.htmlunit.corejs.javascript.Scriptable start)
      Returns the element at the specified index, or null if the index is invalid.
      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
      Overrides:
      get in class org.htmlunit.corejs.javascript.ScriptableObject
    • namedItem

      public Plugin namedItem(String name)
      Returns the item at the given index.
      Parameters:
      name - the item name
      Returns:
      the item with the given name
    • getLength

      public int getLength()
      Gets the array size.
      Returns:
      the number elements
    • refresh

      public void refresh(boolean reloadDocuments)
      Current implementation does nothing.
      Parameters:
      reloadDocuments - reload yes / no
      See Also:
    • getItemName

      protected String getItemName(Object element)
      Gets the name of the plugin.
      Parameters:
      element - a Plugin
      Returns:
      the name
    • iterator

      public org.htmlunit.corejs.javascript.Scriptable iterator()
      Returns:
      the Iterator symbol