Class NativeIterator

All Implemented Interfaces:
Serializable, ConstProperties, DebuggableObject, IdFunctionCall, Scriptable

public final class NativeIterator extends IdScriptableObject
This class implements iterator objects. See http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Iterators
See Also:
  • Field Details

  • Method Details

    • getStopIterationObject

      public static Object getStopIterationObject(Scriptable scope)
      Get the value of the "StopIteration" object. Note that this value is stored in the top-level scope using "associateValue" so the value can still be found even if a script overwrites or deletes the global "StopIteration" property.
      Parameters:
      scope - a scope whose parent chain reaches a top-level scope
      Returns:
      the StopIteration object
    • getClassName

      public String getClassName()
      Description copied from class: ScriptableObject
      Return the name of the class. This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
      Specified by:
      getClassName in interface Scriptable
      Specified by:
      getClassName in class ScriptableObject
    • execIdCall

      public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
      Description copied from class: IdScriptableObject
      'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned.
      Specified by:
      execIdCall in interface IdFunctionCall
      Overrides:
      execIdCall in class IdScriptableObject