Class NativeIterator

    • Field Detail

      • ITERATOR_TAG

        private static final java.lang.Object ITERATOR_TAG
      • ITERATOR_PROPERTY_NAME

        public static final java.lang.String ITERATOR_PROPERTY_NAME
        See Also:
        Constant Field Values
      • objectIterator

        private java.lang.Object objectIterator
    • Constructor Detail

      • NativeIterator

        private NativeIterator()
        Only for constructing the prototype object.
      • NativeIterator

        private NativeIterator​(java.lang.Object objectIterator)
    • Method Detail

      • getStopIterationObject

        public static java.lang.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 java.lang.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
      • jsConstructor

        private static java.lang.Object jsConstructor​(Context cx,
                                                      Scriptable scope,
                                                      Scriptable thisObj,
                                                      java.lang.Object[] args)
      • getJavaIterator

        private static java.util.Iterator<?> getJavaIterator​(java.lang.Object obj)
        If "obj" is a java.util.Iterator or a java.lang.Iterable, return a wrapping as a JavaScript Iterator. Otherwise, return null. This method is in VMBridge since Iterable is a JDK 1.5 addition.