Module org.htmlunit

Class Plugin

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.Plugin
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 Plugin extends HtmlUnitScriptable
JavaScript host object for Plugin.
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
    Creates an instance.
    Plugin(String name, String description, String filename)
    Creates an instance with the given properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    final Object
    get(int index, org.htmlunit.corejs.javascript.Scriptable start)
    Returns the element at the specified index, or Scriptable.NOT_FOUND if the index is invalid.
    Returns the plugin description.
    Returns the plugin filename.
    int
    Returns the number of MIME types supported by this plugin.
    Returns the plugin name.
    protected Object
    Called by HtmlUnitScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype chain is searched.
    item(int index)
    Returns the MimeType at the given index.
    org.htmlunit.corejs.javascript.Scriptable
    Returns an iterator over the values in this plugin.
    void
    Creates an instance of this object.
    Returns the MimeType with the given MIME type string.

    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, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, 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, 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, has

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

    get, has
  • Constructor Details

    • Plugin

      public Plugin()
      Creates an instance.
    • Plugin

      public Plugin(String name, String description, String filename)
      Creates an instance with the given properties.
      Parameters:
      name - the plugin name
      description - the plugin description
      filename - the plugin filename
  • Method Details

    • jsConstructor

      public void jsConstructor()
      Creates an instance of this object.
    • item

      public MimeType item(int index)
      Returns the MimeType at the given index.
      Parameters:
      index - the index
      Returns:
      the MimeType at the given position, or null if out of range
    • 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
    • get

      public final Object get(int index, org.htmlunit.corejs.javascript.Scriptable start)
      Returns the element at the specified index, or Scriptable.NOT_FOUND 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 MimeType namedItem(String name)
      Returns the MimeType with the given MIME type string.
      Parameters:
      name - the MIME type string to look up
      Returns:
      the matching MimeType, or null if not found
    • getLength

      public int getLength()
      Returns the number of MIME types supported by this plugin.
      Returns:
      the number of elements
    • getDescription

      public String getDescription()
      Returns the plugin description.
      Returns:
      the description
    • getFilename

      public String getFilename()
      Returns the plugin filename.
      Returns:
      the filename
    • getName

      public String getName()
      Returns the plugin name.
      Returns:
      the name
    • iterator

      public org.htmlunit.corejs.javascript.Scriptable iterator()
      Returns an iterator over the values in this plugin.
      Returns:
      the iterator