< prev index next >

## src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/AbstractJSObject.java

Print this page

      21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      22  * or visit www.oracle.com if you need additional information or have any
      23  * questions.
      24  */
      25
      26 package jdk.nashorn.api.scripting;
      27
      28 import java.util.Collection;
      29 import java.util.Collections;
      30 import java.util.Objects;
      31 import java.util.Set;
      32
      33 /**
      34  * This is the base class for nashorn ScriptObjectMirror class.
      35  *
      36  * This class can also be subclassed by an arbitrary Java class. Nashorn will
      37  * treat objects of such classes just like nashorn script objects. Usual nashorn
      38  * operations like obj[i], obj.foo, obj.func(), delete obj.foo will be delegated
      39  * to appropriate method call of this class.
      40  *

      41  * @since 1.8u40
      42  */

      43 public abstract class AbstractJSObject implements JSObject {
      44     /**
      45      * The default constructor.
      46      */
      47     public AbstractJSObject() {}
      48
      49     /**
      50      * @implSpec This implementation always throws UnsupportedOperationException
      51      */
      52     @Override
      53     public Object call(final Object thiz, final Object... args) {
      54         throw new UnsupportedOperationException("call");
      55     }
      56
      57     /**
      58      * @implSpec This implementation always throws UnsupportedOperationException
      59      */
      60     @Override
      61     public Object newObject(final Object... args) {
      62         throw new UnsupportedOperationException("newObject");
      21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      22  * or visit www.oracle.com if you need additional information or have any
      23  * questions.
      24  */
      25
      26 package jdk.nashorn.api.scripting;
      27
      28 import java.util.Collection;
      29 import java.util.Collections;
      30 import java.util.Objects;
      31 import java.util.Set;
      32
      33 /**
      34  * This is the base class for nashorn ScriptObjectMirror class.
      35  *
      36  * This class can also be subclassed by an arbitrary Java class. Nashorn will
      37  * treat objects of such classes just like nashorn script objects. Usual nashorn
      38  * operations like obj[i], obj.foo, obj.func(), delete obj.foo will be delegated
      39  * to appropriate method call of this class.
      40  *
      41  * @deprecated Nashorn JavaScript script engine and APIs, and the jjs tool
      42  * are deprecated with the intent to remove them in a future release.
      43  *
      44  * @since 1.8u40
      45  */
      46 @Deprecated(since="11", forRemoval=true)
      47 public abstract class AbstractJSObject implements JSObject {
      48     /**
      49      * The default constructor.
      50      */
      51     public AbstractJSObject() {}
      52
      53     /**
      54      * @implSpec This implementation always throws UnsupportedOperationException
      55      */
      56     @Override
      57     public Object call(final Object thiz, final Object... args) {
      58         throw new UnsupportedOperationException("call");
      59     }
      60
      61     /**
      62      * @implSpec This implementation always throws UnsupportedOperationException
      63      */
      64     @Override
      65     public Object newObject(final Object... args) {
      66         throw new UnsupportedOperationException("newObject");

< prev index next >